Skip to content

Commit 005c817

Browse files
committed
Move cursor to position 0 on history movement.
1 parent 979a2c3 commit 005c817

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PSReadLine/History.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private void UpdateFromHistory(bool moveCursor)
280280
_buffer.Append(line);
281281
if (moveCursor)
282282
{
283-
_current = Math.Max(0, _buffer.Length + ViEndOfLineFactor);
283+
_current = _options.EditMode == EditMode.Vi ? 0 : Math.Max(0, _buffer.Length + ViEndOfLineFactor);
284284
}
285285
else if (_current > _buffer.Length)
286286
{

0 commit comments

Comments
 (0)