Bram Moolenaar <[email protected]> wrote:
> Dominique wrote:
>
> > PR is ready for integration. but:
> > * I noticed had to use getpos('.') instead of getcurpos() in the test, as
> > :mkview does not save curswant. Perhaps :mkview should save curswant.
>
> Not sure what you mean. When I source the generated file,
> set properly, "j" keeps the column.
I don't see this and the tests were failing with getcurpos()
instead of getpos(). For example, doing:
$ cat > foo.txt <<EOF
foo
foobar
EOF
$ vim --clean foo.txt
Then pressing $ to go to the end of the first line, followed by :mkview
I see that file ~/.vim/view/~=+foo.txt= contains these 2 lines
to restore cursor position at line 1 and column 3:
1
normal! 03|
... but this does not store 'curswant' so doing this...
$ vim --clean foo.txt
.. then :loadview followed by pressing j to go to next line
move the cursor the 3rd column in 2nd line instead of
the last column in the 2nd line. It's not very important
anyway.
> > * I initially wrote tests of ":mkview {nr}" and ":mkview" without argument,
> > which I eventually removed because they were writing to read-only
> > directory in CI. So only :mkview {file} is currently tested. Tests
> > of ":mkview {nr}" and ":mkview" without arg were passing locally,
> > but in CI, they were giving this kind of error:
> > ```
> > E739: Cannot create directory: /Users/travis/.vim/view @ function
> > RunTheTest[40]..Test_mkview_loadview_nr, line 13
> > ```
>
> You should be able to solve that by setting 'viewdir'. E.g. set it to
> getcwd() . "/Xview".
Yes. The PR already had tests with 'viewdir'.
The PR is already merged in vim-8.1.331
with tests that cover almost all of :loadview code
anyway.
Regards
Dominique
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.