Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Scroll back to initial cursor location
Browse files Browse the repository at this point in the history
  • Loading branch information
zrzka committed Nov 1, 2017
1 parent ea11ca9 commit 4564c83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* ``Cmd Option R`` - Rename identifier
* Can be used as scripts as well, see `script/refactoring` folder
* Preview dialog can be closed with `Cmd .` / `Esc`, confirmed with `Enter`
* Scroll back to initial cursor location if analyzer didn't find an issue, ugly, but better than end of the file

## 1.3.3 (2017-10-27)

Expand Down
3 changes: 3 additions & 0 deletions blackmamba/script/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def main():

flake8_options = get_config_value('analyzer.flake8', None)

selection = editor.get_selection()
text = _editor_text()

if flake8_options:
Expand All @@ -317,6 +318,8 @@ def main():
annotations += _pyflakes_annotations(path, text)

if not annotations:
if selection:
editor.set_selection(selection[0], scroll=True)
console.hud_alert('No Issues Found', 'iob:checkmark_32', _hud_alert_delay())
return None

Expand Down

0 comments on commit 4564c83

Please sign in to comment.