eaburns / eaburns/T

ui: tabs should count as >1 column when moving a text cursor up/down

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Go
Stars
10
Forks
2
PR merge metrics
No merged PRs in 30d

Description

When moving the cursor up and down with the directional pad, we track the column of the cursor and move it that column in the new line (or eol if the line has fewer columns). When counting columns, tabs currently count as 1 column. They should count as >1 (probably either 4 or 8 — try other textbox implementations and see what they do, and see what feels natural).

This is minor, but using 1 column for tab ends up feeling a bit awkward, because you expect the cursor to move only very little in the horizontal direction when hitting up/down (it's proportional font, so it won't move exactly vertical, but shouldn't move _too_ much horizontally). However, with tabs counting as 1 column but drawing as 8 spaces, the cursor can move a lot horizontally in the face of tabs.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the cursor movement logic that tracks columns for up/down movement and the code that renders tabs. Compare how other textbox implementations treat tab width, then choose a behavior that keeps vertical movement natural. Done means tabs count as more than one column and up/down movement no longer jumps excessively across lines containing tabs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.