Web Inspector: Indenting fully selected line should not indent the line next to it
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 06:17:48 +0000 (06:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 06:17:48 +0000 (06:17 +0000)
commitbea8179e627d7ab96f7500cbb218f9348e1acb11
tree03afd3dcdfa3263257a283867efe9518a0ee39a1
parent110db29d0d0a8e303295a8b646833cfc689897d3
Web Inspector: Indenting fully selected line should not indent the line next to it
https://bugs.webkit.org/show_bug.cgi?id=81758

Source/WebCore:

In the editor, you can select a whole line by moving caret at 0 column
position and pressing Shift + Arrow Down/Up. After that, pressing Tab
indents 2 lines: fully selected one and the line next to it. The patch
changes this behaviour to indent only fully selected line since that is
what pretty-match all the other code editors do.

Patch by Nikita Vasilyev <me@elv1s.ru> on 2012-03-25
Reviewed by Pavel Feldman.

Test: inspector/editor/indentation.html

* inspector/front-end/TextViewer.js:
(WebInspector.TextEditorMainPanel.prototype._indentLines):
    Do not insert indent at the begging of the last line if a selection
    ends on its 0 column.
(WebInspector.TextEditorMainPanel.prototype._unindentLines):
    Do not remove indent at the begging of the last line if a selection
    ends on its 0 column.

LayoutTests:

Patch by Nikita Vasilyev <me@elv1s.ru> on 2012-03-25
Reviewed by Pavel Feldman.

* inspector/editor/indentation-expected.txt: Added.
* inspector/editor/indentation.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/editor/indentation-expected.txt [new file with mode: 0644]
LayoutTests/inspector/editor/indentation.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/TextViewer.js