Hi Bram,
2016-5-18(Wed) 0:40:27 UTC+9 Bram Moolenaar:
> Hirohito Higashi wrote:
>
> > Hi Jan,
> >
> > 2016-5-17(Tue) 21:49:39 UTC+9 Jan:
> > > 1. Edit two new files: "vim -u NONE 1 2"
> > > 2. ":set hidden"
> > > 3. ":next" to file 2
> > > 4. Modify file (but don't save)
> > > 5. ":last"
> > >
> > > Why does it complain with "E37: No write since last change (add ! to override)"? I'm not actually changing away from the buffer, and even if I were, "hidden" is set.
> >
> > Yeah, This is obviously a bug.
> > I'll begin an investigation to correct from now.
>
> This is not a bug, this has always worked this way.
> The idea is that any :next, :last, :first and similar command always
> assume you are switching files, thus will give an error if there are
> unsaved changes. Even if you end up in the same file.
Hmm, When `hidden` has been set, I think that should not occurs `E37`.
BTW, `:next` in latest Vim, I get expected behavior. `:prev` is also so.
$ vim -Nu NONE 1 2 -c "set hidden modified" -c next
No error
$ vim -Nu NONE 1 -c "set hidden modified" -c next
E163: There is only one file to edit
$ vim -Nu NONE 1 2 -c next -c "set hidden modified" -c next
E165: Cannot go beyond last file
$ vim -Nu NONE 1 2 -c next -c "set hidden modified" -c prev
No error
$ vim -Nu NONE 1 -c "set hidden modified" -c prev
E163: There is only one file to edit
$ vim -Nu NONE 1 2 -c "set hidden modified" -c prev
E164: Cannot go before first file
--
Best regards,
Hirohito Higashi (a.k.a. h_east)
--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, May 17, 2016
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment