ui: simplify geteditor

Now $EDITOR and $VISUAL will affect ui.editor directly. So it's no longer
necessary to test them in ui.geteditor.
This commit is contained in:
Jun Wu 2017-03-26 21:41:42 -07:00
parent 28aef1acdc
commit 371e8cfb4e

View File

@ -1326,9 +1326,7 @@ class ui(object):
else: else:
editor = 'vi' editor = 'vi'
return (encoding.environ.get("HGEDITOR") or return (encoding.environ.get("HGEDITOR") or
self.config("ui", "editor") or self.config("ui", "editor", editor))
encoding.environ.get("VISUAL") or
encoding.environ.get("EDITOR", editor))
@util.propertycache @util.propertycache
def _progbar(self): def _progbar(self):