Bug 202619

Summary: Konsole is off by one while editing things in vim
Product: [Applications] konsole Reporter: m.b.lankhorst
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: adaptee
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Affected file

Description m.b.lankhorst 2009-08-05 13:48:47 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Debian testing/unstable Packages

I was editing things with vim, after using /term to find something, it would move the cursor to apparantly the right spot, but saving the file shows that it is off by one.

This happens for example when editing wine/programs/winecfg/Fr.rc

    GROUPBOX        " DirectSound ",IDC_STATIC,8,220,244,45
    LTEXT           "Accélération matérielle : ",IDC_STATIC,15,25,215,80,10

It seems that vim doesn't recognise the bytes encoding, but konsole does, so when I move past Accélération and type something, text will be put in 2 spots before, making editing files a whole lot more challenging.
Comment 1 Matthew Woehlke 2009-08-05 18:02:19 UTC
Casual attempt to reproduce was unsuccessful; it might help if you could attach a file that shows the problem. Also, what is your Konsole profile's encoding set to?
Comment 2 m.b.lankhorst 2009-08-05 23:28:32 UTC
Created attachment 35885 [details]
Affected file

Submitted as binary to prevent encoding changes. konsole was started with UTF-8 encoding.
Comment 3 Jekyll Wu 2011-08-01 13:48:52 UTC
I can reproduce it in KDE-4.7.0. And the same thing happens for me under gnome-terminal and xfce4-terminal, so I guess this looks more like a vim problem.
Comment 4 Jekyll Wu 2011-10-11 12:15:40 UTC
(In reply to comment #3)
> I can reproduce it in KDE-4.7.0. And the same thing happens for me under
> gnome-terminal and xfce4-terminal, so I guess this looks more like a vim
> problem.

Well, I was wrong. This is really a konsole bug. The real problem is 'é' in the example text is an unicode character with ambiguous width, and konsole currently always draw such characters as narrow. See bug #41744 for more info.

*** This bug has been marked as a duplicate of bug 41744 ***