Closed Bug 790576 Opened 12 years ago Closed 12 years ago

When jumping line numbers, pressing UP/DOWN should know how to increment/decrement

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 20

People

(Reporter: vporof, Assigned: vporof)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(2 files)

While doing a :n search, pressing UP would make that :n+1, DOWN :n-1
Also wrap around.
Severity: normal → enhancement
Priority: -- → P3
Status: NEW → ASSIGNED
QA Contact: vporof
FILTER ON PUMPKINS.
Assignee: nobody → vporof
QA Contact: vporof
Attached patch v1Splinter Review
Easy peasy.
I know we also talked about implementing Accel+G and Accel+Shift+G as a way of navigating through results, to be in line with most editors, so I added these here as well.
Attachment #686087 - Flags: review?(past)
Comment on attachment 686087 [details] [diff] [review]
v1

Review of attachment 686087 [details] [diff] [review]:
-----------------------------------------------------------------

I like it, but it needs to do some bounds checking. As it is I can decrease the line number until it reaches 0, which is not a valid line number, and then doesn't increase again by the down arrow. Also if I keep pressing down it will go beneath the last line and keep adding empty lines to the editor. That may become useful when it stops being read-only, but it's annoying now. Adding tests for those cases would be nice, too.

r=me with those fixed.
Attachment #686087 - Flags: review?(past) → review+
Right, I was planning to do that! Don't know why I forgot about it.
Attached patch v1.1Splinter Review
Addressed comments and clamped the line boundaries to 1 .. editor.getLineCount().
https://hg.mozilla.org/mozilla-central/rev/f28ab5d9dcc9
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: