Author Topic: [Solved] Editor losing cursor position when editing  (Read 113 times)

Offline cacb

  • Regular
  • ***
  • Posts: 375
[Solved] Editor losing cursor position when editing
« on: November 06, 2018, 09:22:51 pm »
This problem relates to editing with Code::Blocks source code editor under Kubuntu 18.04
Code::Blocks svn 11278 wx3.0.3 Linux Unicode x64

The problem is a little hard to describe accurately, but please see attached image. Suddenly, when editing code, the editor apparently loses the caret position and I no longer see the text being typed where the cursor is. Instead, the typed text appears at top left in the editor window "over" the line numbers. If I press the space bar or period (full stop) the text appears where it should be. But soon after, or immediately the same happens again.

I have searched for similar problem descriptions, but have found nothing. I tried replacing the keyboard as I thought it was related, but the same happens with the new keyboard. I also used a different USB port for the keyboard and rebooted the computer several times, but the problem persists. The funny thing it looks to be isolated to the Code::Blocks editor. Could it be Scintilla related?

This problem is driving me insane and any hint towards a fix would be most welcome. Thanks in advance!
« Last Edit: November 07, 2018, 09:24:26 pm by cacb »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11197
    • Travis build status
Re: Editor losing cursor position when editing
« Reply #1 on: November 07, 2018, 08:34:27 am »
This is the first time I hear about this problem.
What happens if you update to some newer revision?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cacb

  • Regular
  • ***
  • Posts: 375
Re: Editor losing cursor position when editing
« Reply #2 on: November 07, 2018, 09:24:04 pm »
After a lot of head scratching it seems I have found out what is going on, and how to fix it. It really isn't unique to Code::Blocks after all, as I managed to provoke another scintilla based editor to show the same behavior.  I found someone mentioning linux "input modes" and using im-config -m it was clear I had "uim" (universal input mode) installed. I really don't know why that would be. I tried to fix it with im-config, but without success, and instead uninstalled it with sudo apt-get remove uim .... and the problem was finally gone!

So sorry about the misleading lead towards Code::Blocks, this was indeed something else. But perhaps it is useful to know if anyone sees the same problem. It was the weirdest and most frustrating thing I have seen in a while, and it wasn't easy to search for solutions when you don't know which question to ask.
« Last Edit: November 07, 2018, 09:54:24 pm by cacb »