mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Support clicking past last editor line
Clicking below the last line of an editor now either moves the cursor to the end of the file or selects to the end of the file if shift is pressed.
This commit is contained in:
@@ -326,6 +326,14 @@ class Editor extends View
|
||||
@removeClass 'focused'
|
||||
@autosave() if config.get "editor.autosave"
|
||||
|
||||
@scrollView.on 'click', (e) =>
|
||||
return unless e.target is @scrollView[0]
|
||||
return unless e.offsetY > @overlayer.height()
|
||||
if e.shiftKey
|
||||
@selectToBottom()
|
||||
else
|
||||
@moveCursorToBottom()
|
||||
|
||||
@overlayer.on 'mousedown', (e) =>
|
||||
@overlayer.hide()
|
||||
clickedElement = document.elementFromPoint(e.pageX, e.pageY)
|
||||
|
||||
Reference in New Issue
Block a user