TISTUD-5285 Unable to view file in Resource History for git from editor
  - Fix so we grab proper variable when editor text selection is the current selection.
Fixed TISTUD-5151: do not throw the error while refreshing git index.