mirror of
https://github.com/atom/atom.git
synced 2026-02-09 14:15:24 -05:00
Autocomplete creates selection over auto-completed text
This commit is contained in:
@@ -43,6 +43,7 @@ class Autocomplete
|
||||
|
||||
if match = @matches(prefix, suffix)[0]
|
||||
@editor.insertText(match[1])
|
||||
@editor.setSelectionBufferRange([position, [position.row, position.column + match[1].length]])
|
||||
|
||||
matches: (prefix, suffix) ->
|
||||
regex = new RegExp("^#{prefix}(.+)#{suffix}$", "i")
|
||||
|
||||
Reference in New Issue
Block a user