Saturday, September 1, 2012

Re: vim window clears the terminal history

On Fri, Aug 31, 2012 at 11:47 PM, Chris Jones <cjns1989@gmail.com> wrote:
> On Fri, Aug 31, 2012 at 09:14:14AM EDT, joe M wrote:
>> On Fri, Aug 31, 2012 at 1:27 AM, Chris Jones <cjns1989@gmail.com> wrote:
>> > On Thu, Aug 30, 2012 at 01:34:10PM EDT, joe M wrote:
>
> [..]
>
>> Hope the above helps. Please let me know if you need more information.
>
> I'm not an expert in Vim or termcap/terminfo by a long way... :-)
>
> I'm still not sure you are actually executing the code you compiled, but
> I'll trust you on that. If you are confident the executables in /bin and
> /usr/bin are the ones you compiled yourself, I nevertheless suggest you
> run all your tests invoking them via their full path (/usr/bin/vim and
> /bin/vi).
>
> I also thought that a possible explanation of the inconsistent behavior
> might be caused by the fact that 'vi' was using termcap and 'vim' was
> using terminfo.. and that there might be escape sequence discrepancies
> between the two on your system --something that I believe should not
> happen, since a given terminal's capabilities remain the same and its
> termcap and terminfo escape sequences should therefore be identical.
>
> Another thing: _my understanding_ is that when both terminfo and termcap
> are implemented, Vim chooses terminfo 'automatically' at configure time.
> cf. :help startup-terminal.
>
> And then there is the fact that I see '+terminfo' in the output of both
> the 'vi --version' and the 'vim --version' that you pasted in your
> previous post. (cf. :h +terminfo).
>
> Besides, 'man 5 termcap' has the following: 'The termcap database is an
> obsolete facility for describing the capabilities of character-cell
> termi‐ nals and printers. It is retained only for capability with old
> programs; new ones should use the ter‐ minfo(5) database and associated
> libraries.'
>
> Don't see any good reason Vim would use an 'obsolete facility' unless it
> had to.
>
> In no particular order, a few additional questions/remarks that might
> help clarify:
>
> 1. What distribution are you running?
>
> 2. Did you run the default version of vi/vim before you compiled your
> own from source?
>
> 3. If so, are you positive you removed the prior version?
>
> 4. Not suggesting a workaround, but did you try running the same test on
> a different terminal.. & see what happens..? xterm is probably already
> installed on your system¹, if not, you could also try good ole rxvt?
>
> 5. Conversely, how about temporarily removing your compiled version and
> installing your distro's default version and running a test. If the
> problem goes away, this might suggest that the different behavior is
> caused by one of the --enable-option that you specify at ./configure
> time..?
>
> 6. Would it make sense to generate both executables using the same
> ./configure options.. check whether you still have the problem?
>
> 7. Just in case, is there a TERMCAP environment variable exported to
> your terminal session before you run vi/vim:
>
> % env | grep TERMCAP
>
> 8. As to builtin terminals.. I'm still running vim 7.2 and when I do
> a ':set term=xxx' there is no mention of urxvt or rxvt in my list of
> builtin terminals. Is this also what happens with vim 7.3?
>
> 9. Is termcap implemented on your system? On debian I apparently have it
> as part of the libncurses5-dev package.
>
> Naturally, the above are not really meant as questions, but rather,
> stuff I would ask myself if I had the same problem and that might help
> investigate².
>
> CJ
>
> ¹ Note that in the case of xterm, you can {en/dis}able the alternate
> screen capability by holding down the CTRL key and middle-clicking:
> This brings up a menu where you can check/uncheck 'Enable alternate
> screen switching'.
>
> ² As to the disappearing lines, (the 'seq 1000' test), when I disable
> alternate screen switching, I find that roughly one screen worth of
> numbers are overwritten by the Vim screen that remains visible after
> I exit. I have something like 91 lines on my terminal and when
> I scroll back, the last number I see is 909.. immediately followed by
> the last visible contents of the Vim session --i.e. if I was looking
> at an empty buffer, I see a bash prompt, then vim's tabline, followed
> by a number of empty lines and then the status line and lastly my bash
> prompt at the bottom of the screen. I would imagine this is expected
> behavior (?).
>
> --
>
> WHAT YOU SAY??
>
> --
> 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

Hello CJ,

Thanks for the detailed response. I will go through the email and keep
you posted if I notice anything different.

Again, Thanks a lot for such a detailed response,
Joe

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

No comments: