Loading ...
Sorry, an error occurred while loading the content.

[patch] Wrong value of window's top line

Expand Messages
  • Lech Lorens
    If two windows show the same buffer, you edit the buffer in one of them in such a way that a fold is created in the other one that starts above the window s
    Message 1 of 2 , Nov 2, 2009
    • 0 Attachment
      If two windows show the same buffer, you edit the buffer in one of them
      in such a way that a fold is created in the other one that starts above
      the window's top line and includes the top line, it will be possible
      to scroll the other window in undesirable ways (e.g. it will be possible
      to put the cursor outside the file or more folds will be shown than there
      actually are).

      The problem can be reproduced by e.g. performing the following:

      set number
      normal isome text
      normal yy10gp
      vert split
      wincmd l
      setl fdm=marker fmr={{{,}}} fdc=5
      wincmd h
      normal gg
      normal O{{{1
      redraw
      normal 50%
      normal o{{{1
      redraw

      Note that the next commands have to be performed "by hand":
      wincmd l
      normal

      Three closed folds are now visible, while in fact only two of them
      exist.

      The attached patch fixes the problem.

      --
      Cheers,
      Lech

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Lech Lorens
      On 02-Nov-2009 Lech Lorens wrote: [...] In case you are unable to reproduce the problem, it can be seen in the following screen shot:
      Message 2 of 2 , Nov 2, 2009
      • 0 Attachment
        On 02-Nov-2009 Lech Lorens <lech.lorens@...> wrote:
        [...]

        In case you are unable to reproduce the problem, it can be seen in the
        following screen shot:
        http://llorens.visualserver.org/wrong-top-line/top-line-wrong.png

        The in-fact-nonexistent fold is the middle one in the window on the
        right. After Vim's behaviour has been corrected, the screen shot looks
        as follows:

        http://llorens.visualserver.org/wrong-top-line/top-line-ok.png

        --
        Cheers,
        Lech

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.