javigon / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

View Cursor Line Only menu dysfunctional in Insert Mode #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run evim or equivalent, editing a file with multiple folds.
2. Find a search string embedded within a fold.
3. Enter Insert mode, if necessary.
4. Use the Tools->Folding->View Cursor Line Only menu item.

What is the expected output? What do you see instead?
Folds should be closed except for the area in which the cursor landed within 
the fold. The existing system will, instead, insert "zx" at the cursor.

What version of the product are you using? On what operating system?
Vim 7.0, RHEL 5.5

Please provide any additional information below.
I have tracked this down to an error in menu.vim, line 479 in the current 
menu.vim file (dated May 17, 2013). I am unable to provide a patch file, since 
the RHEL system is on an isolated network, but the solution is to add the 
following line after line 479:

  inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx   <C-O>zM<C-O>zx

Ironically the problem is addressed in the help file for :inoremenu. Because 
there are two normal mode commands, the standard substitution of the :anoremenu 
command is inadequate.

Original issue reported on code.google.com by ultra.jo...@gmail.com on 22 May 2014 at 5:07

GoogleCodeExporter commented 9 years ago
Thanks for the fix, I'll include it.
Note that Vim is at verison 7.4, 7.0 is very old.

Original comment by brammool...@gmail.com on 22 May 2014 at 7:17