[vim/vim] Ctrl-X fails to decrement some hex values (#2746)

33 views
Skip to first unread message

Hengyang Zhao

unread,
Mar 23, 2018, 2:03:25 PM3/23/18
to vim/vim, Subscribed

Version: 8.0.1573
Platform: Fedora 27 x86_64

Ctrl-X fails to decrement 0xfffffffffffffffe.

How to reproduce:

  1. Start vim version 8.0.1573 vim -N -u NONE.
  2. Insert 0x0.
  3. In normal mode, do Ctrl-X on the hex number several times. It will first become 0xffffffffffffffff, then stop at 0xfffffffffffffffe and won't change on more Ctrl-X strokes.
  4. Do Ctrl-A on 0xfffffffffffffffe, it directly goes back to 0x0000000000000000, skipping 0xffffffffffffffff.
  5. Repeat from step 2 for bin and oct using 0b0 or 00.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

K.Takata

unread,
Jun 7, 2018, 11:03:06 AM6/7/18
to vim/vim, Subscribed

I found that vim_str2nr couldn't convert some large values.
E.g. It converts the strings between "0xfffffffffffffff0" to "0xfffffffffffffffe" to 0xffffffffffffffff.

I wrote a patch for this:
https://bitbucket.org/k_takata/vim-ktakata-mq/src/b1f0723e43bcdb97c403b269cb9dff287dbc2149/fix-2746.patch?at=default&fileviewer=file-view-default
(Test is not included, though.)

Bram Moolenaar

unread,
Jun 12, 2018, 11:26:30 AM6/12/18
to vim/vim, Subscribed

Closed #2746 via 07ccf7c.

Reply all
Reply to author
Forward
0 new messages