Open Bug 734831 Opened 13 years ago Updated 2 years ago

Find should vertically align the matched word to be at the center of view

Categories

(DevTools :: Source Editor, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: Optimizer, Unassigned)

References

Details

(Whiteboard: [sourceeditor])

Attachments

(1 file)

In sourceEditor, when you find a word, the matched word should appear at the center of the viewport (vertically) and not at the last visible line.
Whiteboard: [styleinspector][sourceeditor]
Whiteboard: [styleinspector][sourceeditor] → [sourceeditor]
*Might* do this for bug 759351.
Depends on: 759351
This bug can benefit from the patch I wrote in bug <https://bugzilla.mozilla.org/show_bug.cgi?id=724585> (awaiting review right now).
Not exactly. Centering the caret line in Orion is different. We are not allowed to do real scroll events. You have Orion API to do the scroll and all capabilities are there. getTopIndex() tells you the visible line at the top of viewport. getBottomIndex() tells you the visible line at the bottom of viewport. ... and more. Also see SourceEditor.setCaretPosition() which already does center the target line in the viewport. We need to use something like that for find.
Moving to Source Editor component. Filter on CHELICERAE.
Component: Developer Tools → Developer Tools: Source Editor
Attached patch proposed patch (deleted) — Splinter Review
Nice improvement to see the find result in the middle of the viewport.
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Attachment #645382 - Flags: review?(rcampbell)
Depends on: 732981
No longer depends on: 759351
Version: 13 Branch → Trunk
Blocks: 746218
Comment on attachment 645382 [details] [diff] [review] proposed patch Groovy.
Attachment #645382 - Flags: review?(rcampbell) → review+
This bug is still valid with codemirror, tested in the style editor. The debugger has its own find UI and it does center the match in the view. (unassigned myself because I am not actively working on source editor bugs)
Assignee: mihai.sucan → nobody
Status: ASSIGNED → NEW
Priority: -- → P3
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: