Hi Wiktor!

On Do, 10 Jan 2013, Wiktor Ruben wrote:

> Hello again dear Vimmers!
> 
> Recently I have encountered very strange Vim's behaviour during
> switching files:
> 
> vim -u NONE -N
> :h
> <C-w>o " to make 'help' window the only one
> L      " to move cursor to the bottom of the window
> <C-6>  " or <C-^> to switch to alternate file
> <C-6>  " go back to 'help' file
> 
> Cursor in window with 'help' file is now centered. But I didn't ask
> for this! I want cursor to stay where I left it. I dont't want Vim to
> make me happy whether I like it or not. What is the rationale behind
> this annoying behaviour?
> 
> I tried to fix this using following code:
> 
> if v:version >= 700
>   au BufLeave * let b:winview = winsaveview()
>   au BufEnter * if (exists('b:winview')) | call winrestview(b:winview)
> | endif
> endif
> 
> vim -u NONE -N -S file_with_the_above_code
> 
> but it doesn't work for described scenario. So, once again: what is
> the rationale behind this behaviour and how can it be fixed ?

I don't know why this happens, but this seems consistent with other vi 
clones. I haven't anything found about it in POSIX. I am not sure, this 
is something we can fix (by setting a 'cpo' flag?) Bram, is this 
something, that would warrant a patch?

Mit freundlichen Grüßen
Christian
-- 
Das Wahre ist eine Fackel, aber eine ungeheure; deswegen suchen 
wir alle nur blinzend so daran vorbeizukommen, in Furcht sogar, uns 
zu verbrennen.
                -- Goethe, Maximen und Reflektionen, Nr. 373

-- 
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

Reply via email to