Skip to content

Vim $ does not move to end of line when cursor is already at end of short line, then moving to longer line of text #48855

@wayneforrest

Description

@wayneforrest

Reproduction steps

Vim $ does not move to end of line when cursor is already at end of short line, then moving to longer line of text

	go func() {

		// panic handling
		defer func() {
			if r := recover(); r != nil {
				g.Errorf("panic error: [%v]\nstacktrace:\n %v\n", r, string(debug.Stack()))
			}
		}()

1: Move cursor to the end of the last line using arrow keys. The cursor is at the end of this line }()
2: Your cursor is already at the end of the line, now press the $ key.
Nothing should happen as the cursor is already at the end of the line.
3: Now navigate with the arrow keys up, and notice the the cursor does not jump to the end of the lines.

This is tested using Zed Version:

Zed 0.222.4 
b385025df963c9e8c3f74cc4dadb1c4b29b3c6f0

0.222.4+stable.147.b385025df963c9e8c3f74cc4dadb1c4b29b3c6f0

### Current vs. Expected behavior

cursor moves like vim does.

### Zed version and system specs

Zed 0.222.4 
b385025df963c9e8c3f74cc4dadb1c4b29b3c6f0

0.222.4+stable.147.b385025df963c9e8c3f74cc4dadb1c4b29b3c6f0

### Attach Zed log file

<details><summary>Zed.log</summary>

<!-- Paste your log inside the code block. -->
```log

Relevant Zed settings

settings.json

Relevant Keymap

keymap.json

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    .contrib/good first issueIssue suitable for first-time contributorsfrequency:alwaysBug that happens for everyone on every platform no matter how they use Zedpriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugsstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions