Changeset 205414 in webkit


Ignore:
Timestamp:
Sep 3, 2016 5:38:25 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Change Cmd-D from kill line to selecting next occurrence
https://bugs.webkit.org/show_bug.cgi?id=161514

Patch by Devin Rousso <Devin Rousso> on 2016-09-03
Reviewed by Brian Burg.

  • UserInterface/Controllers/CodeMirrorTextKillController.js:

(WebInspector.CodeMirrorTextKillController):
(WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
Remove Cmd-D mapping.

  • UserInterface/External/CodeMirror/sublime.js:
  • UserInterface/Main.html:

Add Sublime Text keybinding support.

  • UserInterface/Views/CodeMirrorAdditions.js:

Use Sublime text selectNextOccurrence for Cmd-D instead of deleteLine.

Location:
trunk/Source/WebInspectorUI
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r205413 r205414  
     12016-09-03  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        Web Inspector: Change Cmd-D from kill line to selecting next occurrence
     4        https://bugs.webkit.org/show_bug.cgi?id=161514
     5
     6        Reviewed by Brian Burg.
     7
     8        * UserInterface/Controllers/CodeMirrorTextKillController.js:
     9        (WebInspector.CodeMirrorTextKillController):
     10        (WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
     11        Remove Cmd-D mapping.
     12
     13        * UserInterface/External/CodeMirror/sublime.js:
     14        * UserInterface/Main.html:
     15        Add Sublime Text keybinding support.
     16
     17        * UserInterface/Views/CodeMirrorAdditions.js:
     18        Use Sublime text selectNextOccurrence for Cmd-D instead of deleteLine.
     19
    1202016-09-03  Devin Rousso  <dcrousso+webkit@gmail.com>
    221
  • trunk/Source/WebInspectorUI/Scripts/update-codemirror-resources.rb

    r167294 r205414  
    3737  addon/runmode/runmode.js
    3838  addon/search/searchcursor.js
     39  keymap/sublime.js
    3940  lib/codemirror.css
    4041  lib/codemirror.js
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTextKillController.js

    r192804 r205414  
    4747            "Ctrl-K": this._handleTextKillCommand.bind(this, "killLine", false),
    4848            "Alt-D": this._handleTextKillCommand.bind(this, "delWordAfter", false),
    49             "Cmd-D": this._handleTextKillCommand.bind(this, "deleteLine", false),
    5049            // Overrides for the 'macDefault' keymap.
    5150            "Alt-Delete": this._handleTextKillCommand.bind(this, "delGroupAfter", false),
     
    10099        let killedText;
    101100        if (change.to.line === change.from.line + 1 && change.removed.length === 2) {
    102             // An entire line was deleted, including newline (Cmd-D).
     101            // An entire line was deleted, including newline (deleteLine).
    103102            if (change.removed[0].length && !change.removed[1].length)
    104103                killedText = change.removed[0] + "\n";
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r205211 r205414  
    221221    <script src="External/CodeMirror/searchcursor.js"></script>
    222222    <script src="External/CodeMirror/sql.js"></script>
     223    <script src="External/CodeMirror/sublime.js"></script>
    223224    <script src="External/CodeMirror/xml.js"></script>
    224225
  • trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js

    r204924 r205414  
    585585        "Shift-Alt-PageDown": alterNumber.bind(null, -100),
    586586        "Cmd-/": "toggleComment",
     587        "Cmd-D": "selectNextOccurrence",
    587588        "Shift-Tab": "indentLess",
    588589        fallthrough: "macDefault"
Note: See TracChangeset for help on using the changeset viewer.