mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Explicitly check for selection when overriding return.
This commit is contained in:
parent
615b85440c
commit
39a97135de
1 changed files with 4 additions and 2 deletions
|
@ -263,8 +263,10 @@ module.exports = class SpellView extends CocoView
|
|||
@ace.commands.on 'exec', (e) =>
|
||||
# When pressing enter with an active selection, just make a new line under it.
|
||||
if e.command.name is 'enter-skip-delimiters'
|
||||
e.editor.execCommand 'gotolineend'
|
||||
return true
|
||||
selection = @ace.selection.getRange()
|
||||
unless selection.start.column is selection.end.column and selection.start.row is selection.end.row
|
||||
e.editor.execCommand 'gotolineend'
|
||||
return true
|
||||
|
||||
fillACE: ->
|
||||
@ace.setValue @spell.source
|
||||
|
|
Loading…
Reference in a new issue