onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.36k stars 300 forks source link

Feature/fix buffer opening closing #2644

Closed akinsho closed 5 years ago

akinsho commented 5 years ago

Fixes #2639, the issue here was that during the refactor of the quick open menu we now check against the Oni.FileOpenMode enum for the legacy setting editor.quickOpen.fileOpenMode which is set to Edit which in the enum is represented by O so the legacy check if(legacy //which is 0) coerces to false and this fails.

The fn then looks for the new setting quickOpen.fileOpenMode which isn't set in the default config so that fails and the default value it is passed is Oni.FileOpenMode.NewTab so it calls tabnew!

this PR fixes the legacy check so it works and also adds a default config for the new command and sets it to edit by default

codecov[bot] commented 5 years ago

Codecov Report

Merging #2644 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2644   +/-   ##
=======================================
  Coverage   45.72%   45.72%           
=======================================
  Files         361      361           
  Lines       14597    14597           
  Branches     1917     1917           
=======================================
  Hits         6674     6674           
  Misses       7695     7695           
  Partials      228      228
Impacted Files Coverage Δ
...src/Services/Configuration/DefaultConfiguration.ts 87.5% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c4fc770...1593d8a. Read the comment docs.

akinsho commented 5 years ago

@CrossR when you get a chance can you have a look at this change I think its fairly minor and fixes the buffers mode opening/closing issue