On Sat, Jul 13, 2013 at 2:03 PM, yeer kunth wrote:

> Hi, all.
>
> I found a strange issue happens on Mac, not sure it's a bug or not.
>
>
> Say I map a shortcut to TestEcho function, they looks like these in the
> .vimrc file.
>
> nmap <C-@>f :echo TestEcho()<CR>
>
> function! TestEcho()
>         let v = winsaveview()
>         try
>                 return "foobar"
>         finally
>                 call winrestview(v)
>         endtry
> endfunction
>
>
> Then I open a vim, and trigger the shortcut, I can see "foobar" in the
> status line.
> However when I use MacVim, the status line shows nothing.
>
>
> In my expectation, the MacVim should act as what vim does. So I checkout
> the latest source code, and found this line of code makes the difference.
>
> https://github.com/b4winckler/macvim/blob/master/src/window.c#L5807
>
> Anyone knows the reason of this magic?
>

Well, usually I avoid modifying the Vim source code so I was a bit
surprised to see this and could not remember why I made this change.  All I
can come up with is this commit message, which describes the change:

    Avoid display corruption on :vsp and 'go' changes

    Always redraw the screen when splitting vertically or when the 'go'
    option is modified (it may e.g. cause scrollbars to hide/show).

So, it seems to be related to vertical splitting.  Perhaps there is a
better way to solve the problem?

Björn

-- 
-- 
You received this message from the "vim_mac" 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_mac" 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/groups/opt_out.


Reply via email to