Skip to content
Myr

Make sure that the query before the cursor is not hidden

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #3176

authored by Junegunn Choi · committed by Junegunn Choi · parent 352ea07 · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:src/terminal.go+1 added-2 removed
1336 unmodified lines
1337 maxWidth := util.Max(1, t.window.Width()-t.promptLen-1)13381339 _, overflow := t.trimLeft(t.input[:t.cx], maxWidth)1340 minOffset := int(overflow)1341 maxOffset := util.Min(util.Min(len(t.input), minOffset+maxWidth), t.cx)13421341 maxOffset := minOffset + (maxWidth-util.Max(0, maxWidth-t.cx))/21342 t.xoffset = util.Constrain(t.xoffset, minOffset, maxOffset)1343 before, _ := t.trimLeft(t.input[t.xoffset:t.cx], maxWidth)1344 beforeLen := t.displayWidth(before)1345 after, _ := t.trimRight(t.input[t.cx:], maxWidth-beforeLen)
2246 unmodified lines