Left margin not correctly restored when returning from diff mode

1 view
Skip to first unread message

François Ingelrest

unread,
Nov 24, 2009, 4:46:14 AM11/24/09
to vim...@googlegroups.com
Hi all,

I've started to use the command DiffOrig proposed in the help (see :h
:DiffOrig). When I use it and then return to normal mode, the left
margin is not correctly restored, some empty space being left in front
of the text (or in front of line numbers if displayed).

Here are some steps:

1. Open an existing file
2. Add a space somewhere
3. :DiffOrig
4. :only

After the last step, the margin is not correctly restored (see the
attached two screenshots).

This is with Vim 7.2.302 on Ubuntu 9.10 (normal features, no GUI).

before.png
after.png

Christian Brabandt

unread,
Nov 24, 2009, 5:04:22 AM11/24/09
to vim...@googlegroups.com
On Tue, November 24, 2009 10:46 am, François Ingelrest wrote:
> Here are some steps:
>
> 1. Open an existing file
> 2. Add a space somewhere
> 3. :DiffOrig
> 4. :only
>
> After the last step, the margin is not correctly restored (see the
> attached two screenshots).

I believe, that is the foldcolumn. You should issue :diffoff when closing
your diff. See :h foldcolumn

regards,
Christian
--
:wq

François Ingelrest

unread,
Nov 24, 2009, 5:11:44 AM11/24/09
to vim...@googlegroups.com
On Tue, Nov 24, 2009 at 11:04, Christian Brabandt wrote:
> I believe, that is the foldcolumn. You should issue :diffoff when closing
> your diff. See :h foldcolumn

Indeed, thanks!

Is there a way to go back to "normal mode" (i.e., closing the diff
window and issuing :diffoff) or should I just create a mapping for
doing that?

Lech Lorens

unread,
Nov 24, 2009, 5:23:26 AM11/24/09
to vim...@googlegroups.com
2009/11/24 François Ingelrest <francois....@gmail.com>:


You will have to create a mapping for this.

--
Cheers,
Lech Lorens

Reply all
Reply to author
Forward
0 new messages