Skip to content

Commit

Permalink
Merge pull request #971 from jcb91/select_keymap
Browse files Browse the repository at this point in the history
[select_keymap] honour default params as declared in yaml
  • Loading branch information
jcb91 authored Apr 24, 2017
2 parents dfbe86c + eaa6e11 commit 28fae80
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ define([
"sublime"
];

/* Values to use for config keys that are note defined in server config */
var default_config = {
line_wrap: true,
local_storage: true,
};

var starting_state = {
extraKeys: {},
edit_shortcuts: {},
Expand Down Expand Up @@ -149,7 +155,10 @@ define([
});

function get_config(key) {
return server_config.data["select_keymap_" + key];
if (server_config.data.hasOwnProperty("select_keymap_" + key)) {
return server_config.data["select_keymap_" + key];
}
return default_config[key];
}

function get_stored_keymap() {
Expand Down

0 comments on commit 28fae80

Please sign in to comment.