Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.39k stars 166 forks source link

Pressing up arrow unexpectedly selects all the way up instead of only the line above #5526

Closed pintassilgo closed 1 month ago

pintassilgo commented 1 month ago
  1. Word-wrap disabled.

  2. Open a new document and paste this demo content:

    a b .eyJzZXNzaW9uSUQiOiIzMmFmNTA0Ni0zNTUyLTExZWMtOTE4OC0wMjQyYWMxMTAwMDMiLCJjbGllbnRJUCI6IjI4MDQ6MTRjOjViODU6OGNmMjpiZDQ2OjI5OmQ2M2E6YTQyZiIsImNpdHkiOiJCZWxvIEhvcml6b250ZSIsInBvc3RhbENvZGUiOiIzMDAwMCIsImNvdW50cnkiOiJCUiIsImRtYSI6MCwiYWN0aXZlUmVnaW9uIjoiQlIiLCJkZXZpY2VMYXQiOi0xOS45MDI5LCJkZXZpY2VMb24iOi00My45NTcyLCJwcmVmZXJyZWRMYW5ndWFnZSI6ImVuIiwiZGV2aWNlVHlwZSI6IndlYiIsImRldmljZVZlcnNpb24iOiI5NC4wLjAiLCJkZXZpY2VNYWtlIjoiZmlyZWZveCIsImRldmljZU1vZGVsIjoid2ViIiwiYXBwTmFtZSI6IndlYiIsImFwcFZlcnNpb24iOiI1LjEwNC4yLTVjNzI4ZjNmMDc3MzdiNTE2MjZlZjhiNTliYjQ0ZTljOTk0OTE3MWYiLCJjbGllbnRJRCI6IjBlNDFiNzI4LTUzMDItNDM4OC1iMGE1LTNkMjQ1M2QzMjI4ZiIsImNtQXVkaWVuY2VJRCI6IiIsImlzQ2xpZW50RE5UIjpmYWxzZSwidXNlcklEIjoiIiwibG9nTGV2ZWwiOiJERUZBVUxUIiwidGltZVpvbmUiOiJBbWVyaWNhL1Nhb19QYXVsbyIsInNlcnZlclNpZGVBZHMiOnRydWUsImUyZUJlYWNvbnMiOmZhbHNlLCJmZWF0dXJlcyI6e30sImF1ZCI6IioucGx1dG8udHYiLCJleHAiOjE2MzUxNjc1NjksImp0aSI6IjJhYmM5ODcyLTlhYWUtNGZhZC04MjY3LTViMmU4NjlhMzllYiIsImlhdCI6MTYzNTEzODc2OSwiaXNzIjoiYm9vdC5wbHV0by50diIsInN1YiI6InByaTp2MTpwbHV0bzpkZXZpY2VzOkJSOk1HVTBNV0kzTWpndE5UTXdNaTAwTXpnNExXSXdZVFV0TTJReU5EVXpaRE15TWpobSJ9.7PaDfedKEDT-lIkYNv1OJUwE2xKbvnC0XdJT_c6OHow

  3. After pasting, caret should be at last position of the last line (the long one).

  4. Press Shift+Home. Will select the entire last line, OK.

  5. Now press Shift+up arrow. Should expand current selection to the line above, composed by only the letter b. Instead, it selects all the way up, including a at first line.

Alexey-T commented 1 month ago

Did not reproduce.

post your user.json.

composed by only the letter b

note: line has SPACE and 'b' char. all 3 lines have space leading.

pintassilgo commented 1 month ago

Original demo didn't have spaces at left, but it doesn't matter, I can still reproduce with them.

I'll try to get better STR.

pintassilgo commented 1 month ago

HiOccur is once again related. Install and you'll see. I reproduced in clean Cuda doing exactly what I said, just installing hilite before last two steps.

Alexey-T commented 1 month ago

HiOccur is present here. I tried to turn on its options sel_allow/caret_allow. Still no effect.

What steps for clean app?

pintassilgo commented 1 month ago
  1. Extract cudatext-linux-qt5-amd64-1.214.6.2.tar.xz to a new folder.
  2. Run cuda from this new folder (100% factory clean cuda).
  3. Install Hilite.
  4. Follow steps from initial comment.
Alexey-T commented 1 month ago

Reproduced!

Alexey-T commented 1 month ago

Fixed, beta updated.

pintassilgo commented 1 month ago

Looks fixed, thanks!

Alexey-T commented 1 month ago

Commands 'go to screen top/ bottom/ center' also depend on Caret.CoordXY. but I cannot repro bug with them (after selecting block, so HiOccur works).