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

Re: bug with getpos("'>")[2] with multibyte charactor?

Expand Messages
  • Ingo Karkat
    ... Correct. [At least in GVIM,] the cursor turns into a double-width block when on a Kanji character. virtualedit only applies to positioning inside
    Message 1 of 3 , Apr 3, 2010
      On 03-Apr-2010 19:04, Tony Mechelynck wrote:
      > I don't think that marks can be set halfway a character anyway, even
      > with 'virtualedit' nonempty. (Or can they?)

      Correct. [At least in GVIM,] the cursor turns into a double-width block when on
      a Kanji character. 'virtualedit' only applies to positioning inside <Tab>
      characters.

      Also be aware that the byte-index returned by getpos() is not related to the
      screen width of a character (queried via virtcol()). In UTF-8 encoding, a Kanji
      character is stored in 3 byte, but takes two columns of screen space. There can
      also be multi-column characters that only take up one byte (<Tab> is the most
      prominent one), and multi-byte characters that only take up one column.

      -- regards, ingo

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      To unsubscribe, reply using "remove me" as the subject.
    Your message has been successfully submitted and would be delivered to recipients shortly.