Skip to content

Added the possibility to automatically jump to first diff ocurrence#2858

Closed
plafue wants to merge 9 commits intocodemirror:masterfrom
plafue:jump_to_first_difference
Closed

Added the possibility to automatically jump to first diff ocurrence#2858
plafue wants to merge 9 commits intocodemirror:masterfrom
plafue:jump_to_first_difference

Conversation

@plafue
Copy link
Copy Markdown

@plafue plafue commented Oct 12, 2014

The merge addon now can jump to the first difference if configured so. I'm not quite happy with the hard coded 8 in line 64, maybe someone has a tip how to easily get the font size of the editor?

@marijnh
Copy link
Copy Markdown
Member

marijnh commented Oct 13, 2014

I think a much better API would be to simply expose a method jumpToDiffAfter, which takes a position that defaults to the cursor position, and jumps to the first change after this position. That way, you can call it after creating the editor, to get the behavior you implemented here, but also bind a key to it (I use alt-down a lot in Meld, which does precisely this)

@marijnh marijnh closed this in fb78920 Feb 24, 2015
@marijnh
Copy link
Copy Markdown
Member

marijnh commented Feb 24, 2015

You should add a comment when you add patches -- otherwise, I won't notice them.

Anyway, your implementation still isn't really what I was looking for. See my attached patch for an alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants