Bug 508523 - Konsole seems unable to correctly handle Vim's line numbers when Vim is in Arabic or Hebrew modes.
Summary: Konsole seems unable to correctly handle Vim's line numbers when Vim is in Ar...
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: emulation (other bugs)
Version First Reported In: 25.08.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-20 16:26 UTC by lij1478@163.com
Modified: 2025-08-20 16:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
This is a screenshot comparing VSCode and Konsole. (100.82 KB, image/png)
2025-08-20 16:26 UTC, lij1478@163.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lij1478@163.com 2025-08-20 16:26:38 UTC
Created attachment 184288 [details]
This is a screenshot comparing VSCode and Konsole.

(Translated into English by AI, with the original Chinese text appended at the end.)

SUMMARY
Konsole cannot correctly handle Vim's line numbers (in Arabic or Hebrew modes) like TTY or xterm does.

STEPS TO REPRODUCE
1. Execute "vim -A" or "vim -H" in the shell started by konsole.
2. :set number
3. Type something

OBSERVED RESULT
The line numbers in Vim do not appear on the left or right side of the screen; instead, they are positioned at the end of the line, shifting along with the movement of the last character within the line until they reach the left edge of the screen.

When the line ends with left-to-right (e.g., numeric) characters, these characters will appear to the left of the line numbers.

EXPECTED RESULT
In "vim -A" or "vim -H", the line numbers appear on the right side.

SOFTWARE/OS VERSIONS
(kinfo)
```
Operating System: Arch Linux 
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.16.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 18 × Intel® Core™ Ultra 5 125H
Memory: 32 GiB of RAM (30.8 GiB usable)
Graphics Processor: Intel® Arc
```

ADDITIONAL INFORMATION

After testing multiple terminal emulators on my device, I found that the terminal emulators of GNOME, MATE, and Xfce all exhibit the same issue.

GVim, VSCode, XTerm, Kitty, and Linux TTY do not exhibit such issues.

============================

【摘要】
终端界面不能像 TTY 或 xterm 那样正确处理 Vim(在阿拉伯模式或希伯来模式中的)行号

【复现过程】
1. 在 konsole 启动的 shell 中执行“vim -A”或“vim -H”
2. :set number
3. 在窗口中随意输入内容

【异常现象】
vim 的行号不在屏幕左侧或右侧,而是出现在行末的位置,随行内最后一个字符移动而移动,直到触及屏幕左侧边缘
当该行以左到右(譬如数字)字符结尾时,这部分的字符会跑到行号右侧

【补充信息】
我在我的设备上测试过多个终端模拟器发现,gnome、MATE 和 Xfce 的终端模拟器,均存在这个问题。
GVim、VSCode、XTerm、Kitty 和 Linux TTY 中则没有这样的现象。

【预期现象】
在 vim -A 或 vim -H 中,行号出现在右侧