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

[vim-multibyte] [Bug] "yl" command doesn't yank 1 multibyte-char at the end of line.

Expand Messages
  • Takuhiro Nishioka
    When cursor is at the end of line and the character under cursor is a multibyte character. yl doesn t yank 1 multibyte-char. -- Takuhiro Nishioka
    Message 1 of 3 , Mar 21 1:47 AM
    • 0 Attachment
      When cursor is at the end of line and the character under
      cursor is a multibyte character. "yl" doesn't yank 1
      multibyte-char.

      --
      Takuhiro Nishioka mailto:takuhiro@...
    • Taro Muraoka
      ... I made a patch for this. ... Taro Muraoka Problem: When cursor is at the end of line and the character under cursor is a
      Message 2 of 3 , Mar 21 8:16 AM
      • 0 Attachment
        > When cursor is at the end of line and the character under
        > cursor is a multibyte character. "yl" doesn't yank 1
        > multibyte-char.
        >
        > --
        > Takuhiro Nishioka mailto:takuhiro@...

        I made a patch for this.
        ----
        Taro Muraoka <koron@...>


        Problem: When cursor is at the end of line and the character under
        cursor is a multibyte character. "yl" doesn't yank 1
        multibyte-char.
        Solution: Change to recognize a last multibyte-char correctly in
        oneright() function.
        Files: src/edit.c

        *** edit.c.orig Wed Mar 22 01:05:30 2000
        --- edit.c Wed Mar 22 01:06:06 2000
        ***************
        *** 3808,3815 ****
        char_u *base;

        base = ml_get(curwin->w_cursor.lnum);
        ! if (*(ptr+1) != NUL && IsTrailByte(base, ptr))
        ! ++curwin->w_cursor.col;
        }
        #endif
        curwin->w_set_curswant = TRUE;
        --- 3808,3820 ----
        char_u *base;

        base = ml_get(curwin->w_cursor.lnum);
        ! if (IsTrailByte(base, ptr))
        ! {
        ! if (*(ptr + 1) == NUL)
        ! return FAIL;
        ! else
        ! ++curwin->w_cursor.col;
        ! }
        }
        #endif
        curwin->w_set_curswant = TRUE;
      • Takuhiro Nishioka
        ... [...] ... Thanks! It worked fine. -- Takuhiro Nishioka mailto:takuhiro@super.win.ne.jp
        Message 3 of 3 , Mar 21 9:51 AM
        • 0 Attachment
          Taro Muraoka wrote:
          > I made a patch for this.
          [...]
          > Problem: When cursor is at the end of line and the character under
          > cursor is a multibyte character. "yl" doesn't yank 1
          > multibyte-char.
          > Solution: Change to recognize a last multibyte-char correctly in
          > oneright() function.
          > Files: src/edit.c

          Thanks!

          It worked fine.

          --
          Takuhiro Nishioka mailto:takuhiro@...
        Your message has been successfully submitted and would be delivered to recipients shortly.