File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2395,6 +2395,9 @@ def finish
23952395 width = Reline ::Unicode . get_mbchar_width ( mbchar )
23962396 @cursor_max -= width
23972397 if @cursor > 0 and @cursor >= @cursor_max
2398+ byte_size = Reline ::Unicode . get_prev_mbchar_size ( @line , @byte_pointer )
2399+ mbchar = @line . byteslice ( @byte_pointer - byte_size , byte_size )
2400+ width = Reline ::Unicode . get_mbchar_width ( mbchar )
23982401 @byte_pointer -= byte_size
23992402 @cursor -= width
24002403 end
Original file line number Diff line number Diff line change @@ -1434,4 +1434,22 @@ def test_pasting_fullwidth
14341434 assert_cursor ( 4 )
14351435 assert_cursor_max ( 4 )
14361436 end
1437+
1438+ def test_ed_delete_next_char_at_eol
1439+ input_keys ( '"あ"' )
1440+ assert_line ( '"あ"' )
1441+ assert_byte_pointer_size ( '"あ"' )
1442+ assert_cursor ( 4 )
1443+ assert_cursor_max ( 4 )
1444+ input_keys ( "\C -[" )
1445+ assert_line ( '"あ"' )
1446+ assert_byte_pointer_size ( '"あ' )
1447+ assert_cursor ( 3 )
1448+ assert_cursor_max ( 4 )
1449+ input_keys ( 'xa"' )
1450+ assert_line ( '"あ"' )
1451+ assert_byte_pointer_size ( '"あ"' )
1452+ assert_cursor ( 4 )
1453+ assert_cursor_max ( 4 )
1454+ end
14371455end
You can’t perform that action at this time.
0 commit comments