bte icon indicating copy to clipboard operation
bte copied to clipboard

Cursor doesn't reach end of line

Open EmmChriss opened this issue 4 years ago • 14 comments

Holding <right> doesn't make the cursor reach the last character. Every line has a different column nr. that bte handles as end of line. Hitting keys does cause the corresponding character to be inserted into the buffer, but apparently not under the cursor. It seems that the actual cursor and the visible cursor are at different column indexes.

Terminal: Alacritty

EmmChriss avatar Sep 08 '20 15:09 EmmChriss

Sorry for the late reply Thank you creating an issue :') I ended up finding a few more problems with my code

Sidd-Dino avatar Sep 15 '20 09:09 Sidd-Dino

Could you explain what you mean the cursor doesn't reach the end of the line. I cant seem to replicate this behavior Could you send me an example file in which you found this problem.

Sidd-Dino avatar Sep 15 '20 09:09 Sidd-Dino

This is with the current master branch All I'm doing is press <right>

EmmChriss avatar Sep 17 '20 14:09 EmmChriss

i am able to replicate this behaviour i'll see what i can do

Sidd-Dino avatar Sep 17 '20 14:09 Sidd-Dino

I found out why it does that Damn horizontal tab printf prints out 4 spaces because of it ;-;

Sidd-Dino avatar Sep 17 '20 16:09 Sidd-Dino

I've made a temporary fix in the branch bugfix/cursor_movement Have a look

Sidd-Dino avatar Sep 18 '20 05:09 Sidd-Dino

This seems to have fixed it. But tabs are displayed like <TAB>

EmmChriss avatar Sep 21 '20 08:09 EmmChriss

I'm trying to find a better fix. This is just a temporary fix Adding <TAB> anywhere in the code will transform it into a horizontal tab

Sidd-Dino avatar Sep 21 '20 10:09 Sidd-Dino

Hey @EmmChriss can you test the bte binary in this branch

tab : inserts special tab instead of for spaces

Sidd-Dino avatar Dec 14 '20 10:12 Sidd-Dino

The editing works fine, but not sure if the T with red background is the intended tab character.

EmmChriss avatar Dec 15 '20 11:12 EmmChriss

yeah it's the tab character. I'm sorry for not mentioning it.

Sidd-Dino avatar Dec 15 '20 11:12 Sidd-Dino

If you can associate multiple characters with a single one when displaying it, I think you should make a global constant for now, that specifies how many spaces a tab character means.

EmmChriss avatar Dec 18 '20 10:12 EmmChriss

Right now the red background T signifies the special character \t not 4 spaces or 8. But let me see what i can do

Sidd-Dino avatar Dec 19 '20 05:12 Sidd-Dino

Yo o/
I'm gonna work on the line editing of the text. I hope it fixes the tab bug. :D

Sidd-Dino avatar Jun 21 '21 06:06 Sidd-Dino