bug: Split window + quickfix = content error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

bug: Split window + quickfix = content error

mbbill

"First, open a new vim session.
"Then type the command below follow the instructions.

set buftype=nowrite  "Set the current buffertype.

vsplit  "There are now two split windows.

vim  blabla  *  "just fill the quickfix.

"Now the second splited window will be filled by first search result.

"Then we use <c-o> to jump back. IMPORTANT!!!

copen

"Select one line and press Enter, a new split window appears in the
middle.
:q   "quit the new split window.

"Now, the window closed but the content still there.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Reply | Threaded
Open this post in threaded view
|

Re: bug: Split window + quickfix = content error

mbbill
To reproduce the bug Just extract and source bug.vim.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


vimbug.zip (850 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bug: Split window + quickfix = content error

Tony Mechelynck
In reply to this post by mbbill

I can reproduce the error; I'm describing below what I see in more detail.

Ming Bai wrote:
> "First, open a new vim session.

Using vim 7.1.033 (Huge version) in console mode on openSUSE Linux 10.2

vim -N -u NONE

> "Then type the command below follow the instructions.
>
> set buftype=nowrite  "Set the current buffertype.

this should be done using ":setlocal". This time I'll use plain ":set".

I'm silently adding colons in front of this ex-command and all others below.

>
> vsplit  "There are now two split windows.

the new one (with the cursor) is at left

>
> vim  blabla  *  "just fill the quickfix.

":vim" is short for ":vimgrep".

the window with the cursor now contains the first vimgrep result. The one next
to it (vertically split) has the "nowrite" buffer.

>
> "Now the second splited window will be filled by first search result.
>
> "Then we use <c-o> to jump back. IMPORTANT!!!

this brings back the "nowrite" buffer into the current window too

>
> copen

the right window is split horizontally; the new window is filled with the
quickfix list

>
> "Select one line and press Enter, a new split window appears in the
> middle.

a new horizontally split window appears just above the quickfix window, within
the right half of the vertically-split screen

> :q   "quit the new split window.

we're back in the empty "nowrite" buffer; there are still 3 windows at right:
quickfix list, [No Name] and quickfix list

>
> "Now, the window closed but the content still there.

I suspect a missing retrace

        Ctrl-L

the _bottom_ quickfix list disappears and loses its status line

:redraw

the ex-command is written halfway up the screen instead of at the bottom where
it belongs

Ctrl-W w (three times) we're back where we started, showing there are only
three windows; but #2 (top right) has no status line, and below #3 (quickfix)
there is an unused space with a status line in the middle.

I think you have uncovered a bug. Bram, what do you think?

:bot new

the ex-command appears halfway up again

a full-width window appears at bottom, overlying the "unused space"

:q

a column of blue @ extends the quickfix window downwards. Some more
experimenting shows that it is normal because (in my case) the next match was
a very long line. Apparently everything is back as it should (until next time).



Best regards,
Tony.
--
A successful [software] tool is one that was used to do something
undreamed of by its author.
                -- S. C. Johnson

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Reply | Threaded
Open this post in threaded view
|

Re: bug: Split window + quickfix = content error

Albie Janse van Rensburg

Tony Mechelynck wrote:
> I can reproduce the error; I'm describing below what I see in more detail.
>  
Confirmed on Windows XP, using either Vim or GVim

--

Albie Janse van Rensburg ~ http://morph.telspace.co.za

Please don't send me any MS Word or Powerpoint attachments
unless it's absolutely neccessary - send simply text.
http://www.gnu.org/philosophy/no-word-attachments.html

The days are all empty and the nights are unreal.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


Reply | Threaded
Open this post in threaded view
|

Re: bug: Split window + quickfix = content error

Bram Moolenaar
In reply to this post by mbbill


Ming Bai wrote:

> To reproduce the bug Just extract and source bug.vim.

bug.vim:

> "First, open a new gvim session here.
> "Then type the command below follow the instructions.
> tabnew
> set buftype=nowrite
> vsplit
> silent vim aa * "just fill the quickfix
> exec "norm \<c-o>"
> "Now the second splited window will be filled by first search result.
> "Then we use <c-o> to jump back. IMPORTANT!!!
> copen
> exec "norm j\<cr>"
> "Select one line and press Enter, a new split window appears.
> :q
> "Now, the window closed but the content still there.

I can reproduce it.  Looks like the window layout is messed up.  I'll
add this to my todo list.

--
I'm not familiar with this proof, but I'm aware of a significant
following of toddlers who believe that peanut butter is the solution
to all of life's problems... -- Tim Hammerquist

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---