Make new `rifle` behavior backwards compatible.
commita17508d5c1492af1579ae561a840cdd859946ddc
authortoonn <toonn@toonn.io>
Wed, 31 Jan 2018 10:22:45 +0000 (31 11:22 +0100)
committertoonn <toonn@toonn.io>
Wed, 31 Jan 2018 10:39:54 +0000 (31 11:39 +0100)
tree1eabaf95b7c5156b4a80bb64cc31db5563a128c4
parent14adeb9cfc1d95bda6895883fe70a50a08165589
Make new `rifle` behavior backwards compatible.

There's 4 possible situation:

  1. `VISUAL` set, `EDITOR` set
  2. `VISUAL` set, `EDITOR` not set
  3. `VISUAL` not set, `EDITOR` set
  4. `VISUAL` not set, `EDITOR` not set

All but _No.2_ are already properly handled.
Behavior can differ depending on whether you have an old or a new
`rifle.conf` in cases _No.1_ (if the variables differ the new approach
prefers `VISUAL` instead of `EDITOR`) and _No.2_ (new approach will use
`VISUAL` whereas the old approach would've fallen back to _vim_).
_No.3_ is likely the most common case and works almost identically with
either approach.
_No.4_ still falls back to _vim_ as before.

Fix #1048
ranger/ext/rifle.py