Monday, September 30, 2013

Re: Scrolling (diffing) through VCS revisions


On Sep 30, 2013 7:06 PM, "Ben Fritz" <fritzophrenic@gmail.com> wrote:
>
> On Monday, September 30, 2013 9:30:24 AM UTC-5, ZyX wrote:
> > On Sep 30, 2013 6:21 PM, "Ben Fritz" <fritzo...@gmail.com> wrote:
> > > ZyX, if the new buffer your plugin is creating should always be modifiable, it would be smart to set 'modifiable' explicitly just in case it inherits a bad value.
> >
> > As I said, gJ does not modify current buffer: it instead opens a new one.
>
> And as I said, the new buffer may have 'nomodifiable' set already, inherited from the global value of the option.
>
> gvim -N -u NONE -i NONE
> :set nomodifiable
> :new
> :set modifiable?
>   nomodifiable

This means buffer will be empty as it is populated with setline() (or some manipulations with vim.current.buffer in python). Who cares about not working gJ if buffer is empty while it should show committed version?

Though I do not recall whether or not I was unsetting &modifiable. But this cannot lead to *just* not working gJ.

> --
> --
> 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/groups/opt_out.

--
--
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/groups/opt_out.

No comments:

Post a Comment