mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
💄
This commit is contained in:
@@ -48,6 +48,10 @@ describe "VimMode", ->
|
||||
expect(editor.buffer.getText()).toBe '0123'
|
||||
expect(editor.getCursorPosition()).toEqual([0, 3])
|
||||
|
||||
editor.trigger keydownEvent('x')
|
||||
expect(editor.buffer.getText()).toBe '012'
|
||||
expect(editor.getCursorPosition()).toEqual([0, 2])
|
||||
|
||||
describe "the d keybinding", ->
|
||||
describe "when followed by a d", ->
|
||||
it "deletes the current line", ->
|
||||
|
||||
@@ -5,8 +5,8 @@ class Command
|
||||
class DeleteRight extends Command
|
||||
execute: ->
|
||||
@editor.delete()
|
||||
isOnLastCharachter = @editor.getCursorColumn() == @editor.getCurrentLine().length
|
||||
if isOnLastCharachter
|
||||
isOnEOL = @editor.getCursorColumn() == @editor.getCurrentLine().length
|
||||
if isOnEOL
|
||||
@editor.setCursorColumn(@editor.getCursorColumn() - 1)
|
||||
|
||||
module.exports = { DeleteRight }
|
||||
|
||||
Reference in New Issue
Block a user