On 11/7/06, Bill McCarthy <[EMAIL PROTECTED]> wrote:
On Sun 5-Nov-06 3:21am -0600, Yakov Lerner wrote:
> On 11/5/06, Bill McCarthy <[EMAIL PROTECTED]> wrote:
>> I am having a problem trying to echo a message triggered by
>> an autocmd on BufEnter when entering a tab page.
>>
>> Try this:
>>
>> :au BufEnter foo echom "Entered foo"
>>
>> First lets try opening a window on the same tab page:
>>
>> :sp foo
>>
>> The message appears in the command line area as expected.
>> Switching between windows, the messages is seen each time
>> foo is entered.
>>
>> Wipe foo with: :bw foo
>>
>> Now try a tab page:
>>
>> :tabe foo
>>
>> The message appears as expected. However leaving and then
>> entering the foo tab page does not display the message!
>>
>> Typing :mes shows that the message was indeed displayed.
>> What is overwriting it?
> I can see this, too. The message is visible for some time if I add
> sleep or while getchar(1)|endwh to the rhs of 'au', but disappears
> right after that. Is it tab switching that causes wipeout of the
> message ?
It shouldn't be, the tab triggers occur before the BufEnter.
I modified the autocmd to do a redraw before the echo. That
didn't make any difference in this case. As far as I can
see, there is nothing happening after the echo - yet
something is clearly clearing the line.
There is not-a-solution-but-weird-workaround at
http://www.vim.org/tips/tip.php?tip_id=1379
Tip #1379: make echo seen when it would otherwise disappear and go unseen
Yakov