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

442Re: [60am,mb] visual selection is not drawn correctly

Expand Messages
  • Bram Moolenaar
    Jul 3, 2001
      Yasuhiro Matsumoto wrote:

      > >Please verify that the patch below works properly. It's simpler than your
      > >patch, perhaps I missed something. I verified it works correclty in UTF-8
      > >text. The characters that are highlighted are the ones deleted with "d".
      >
      > No, your patch does not have the same function as my patch.
      >
      > if comparing like multibyte to [], and comparing like
      > selected multibyte to (),
      > below's operation is correctly.
      >
      > 1. one line vertical selection.
      >
      > start point
      > |
      > v
      > []()[][]
      > [][][]
      > []()[][]
      > ^
      > |
      > end point
      >
      > 2. two line vertical selection.
      >
      > start point
      > |
      > v
      > []()()[]
      > []()[]
      > []()()[]
      > ^
      > |
      > end point
      >
      > but your patch's selection is below.
      >
      > 1. one line vertical selection.
      >
      > []()[][]
      > ()()[]
      > []()[][]
      >
      > 2. two line vertical selection.
      >
      > []()()[]
      > ()()()
      > []()()[]

      That is the same as what I see.

      However, suppose one line is selected, as in 1., then press "d" to delete the
      selected text. The two characters in between are also deleted (two spaces
      inserted to align the text). Do you get this as well? Or is there some
      situation where this is different?

      start point
      | after deleting
      v
      []()[][] [][][]
      [][][] []
      []()[][] [][][]
      ^
      |
      end point

      Since the characters are affected, I think they should be highlighted.

      Unfortunately, when using "y" on the same text, pasting it somewhere else
      results in spaces to be inserted, thus you might argue that the two characters
      in between were not included.

      I would argue that deleting is more important here, since you need to be
      warned that "d" deletes more than what you might expect.

      --
      >From "know your smileys":
      :-H Is missing teeth

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Show all 9 messages in this topic