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

Re: problems with highlighting EOL

Expand Messages
  • Lech Lorens
    ... [...] ... I have a similar one: $ vim -u NONE -U NONE -N -c set hls cul -c normal iaa^Mab^Mac^[/^a.*$ na.* When you move the cursor to line 1, lines 1
    Message 1 of 5 , Mar 3, 2009
    • 0 Attachment
      03-03-2009 Markus Heidelberg <markus.heidelberg@...>:
      >
      > when searching for the EOL ($) and 'hlsearch' is set, it doesn't get
      > properly highlighted, if the EOL is in the same column as the cursor is
      > placed after the first match.
      >
      [...]
      >
      > Markus

      I have a similar one:

      $ vim -u NONE -U NONE -N -c 'set hls cul' -c 'normal iaa^Mab^Mac^[/^a.*$\na.*'

      When you move the cursor to line 1, lines 1 and 2 are (correctly)
      highlighted. When you move the cursor to line 2, line 3 gets
      highlighted.

      Reproduced on Vim 7.1.138, 7.2.127.

      --
      Cheers,
      Lech

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Markus Heidelberg
      ... Another related issue, where this patch changes behaviour: vim -c normal 2l^V2j2l screen.c Now toggle start/end of the visual block selection with o
      Message 2 of 5 , Mar 10, 2009
      • 0 Attachment
        Markus Heidelberg, 03.03.2009:
        >
        > Hello,
        >
        > when searching for the EOL ($) and 'hlsearch' is set, it doesn't get
        > properly highlighted, if the EOL is in the same column as the cursor is
        > placed after the first match.
        >
        > To reproduce:
        >
        > vim -u NONE -U NONE -c "set hlsearch" -c "normal 3ix^Mxx^Mxxx^M^[/$^M"
        >
        > ^M = Ctrl-v<Enter>
        > ^[ = Ctrl-v<Esc>
        >
        > and do /$<CR> several times to notice the problem
        >
        > git-bisect tracks it down to this:
        >
        > Patch 7.1.152
        > Problem: Display problem when 'hls' and 'cursorcolumn' are set and
        > searching for "$". (John Mullin) Also when scrolling
        > horizontally when 'wrap' is off.
        > Solution: Keep track of the column where highlighting was set. Check the
        > column offset when skipping characters.
        > Files: src/screen.c

        Another related issue, where this patch changes behaviour:

        vim -c "normal 2l^V2j2l" screen.c

        Now toggle start/end of the visual block selection with 'o' and you can
        see that the highlighting of the EOL in the line in the middle gets
        toggled.

        This char is highlighted by the visual block if the visual selection
        starts at the same column and the cursor is further to the right.

        After reverting the patch, the EOL char is also highlighted, if the
        cursor is below the start of the visual block.

        I think the EOL should never be highlighted, as it's done, if the cursor
        is further to the left than the start of the visual block.

        Markus


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Bram Moolenaar
        ... I can reproduce it. -- hundred-and-one symptoms of being an internet addict: 191. You rate eating establishments not by the quality of the food, but by the
        Message 3 of 5 , Mar 11, 2009
        • 0 Attachment
          Markus Heidelberg wrote:

          > > Hello,
          > >
          > > when searching for the EOL ($) and 'hlsearch' is set, it doesn't get
          > > properly highlighted, if the EOL is in the same column as the cursor is
          > > placed after the first match.
          > >
          > > To reproduce:
          > >
          > > vim -u NONE -U NONE -c "set hlsearch" -c "normal 3ix^Mxx^Mxxx^M^[/$^M"
          > >
          > > ^M = Ctrl-v<Enter>
          > > ^[ = Ctrl-v<Esc>
          > >
          > > and do /$<CR> several times to notice the problem
          > >
          > > git-bisect tracks it down to this:
          > >
          > > Patch 7.1.152
          > > Problem: Display problem when 'hls' and 'cursorcolumn' are set and
          > > searching for "$". (John Mullin) Also when scrolling
          > > horizontally when 'wrap' is off.
          > > Solution: Keep track of the column where highlighting was set. Check the
          > > column offset when skipping characters.
          > > Files: src/screen.c
          >
          > Another related issue, where this patch changes behaviour:
          >
          > vim -c "normal 2l^V2j2l" screen.c
          >
          > Now toggle start/end of the visual block selection with 'o' and you can
          > see that the highlighting of the EOL in the line in the middle gets
          > toggled.
          >
          > This char is highlighted by the visual block if the visual selection
          > starts at the same column and the cursor is further to the right.
          >
          > After reverting the patch, the EOL char is also highlighted, if the
          > cursor is below the start of the visual block.
          >
          > I think the EOL should never be highlighted, as it's done, if the cursor
          > is further to the left than the start of the visual block.

          I can reproduce it.

          --
          hundred-and-one symptoms of being an internet addict:
          191. You rate eating establishments not by the quality of the food,
          but by the availability of electrical outlets for your PowerBook.

          /// Bram Moolenaar -- Bram@... -- 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_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.