allow users to disable the alt+%d buffer switching

This commit is contained in:
Evan Tschuyi 2016-07-13 22:14:03 -07:00 committed by Lorenz Hübschle-Schneider
parent f09997b145
commit 231a524438
3 changed files with 12 additions and 1 deletions

View file

@ -484,6 +484,16 @@ npm run build-electron-{windows, darwin, linux}</pre>
</div>
</form>
</li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="settings.enableAltSwitcher">
Use Alt+&lt;num&gt; to switch buffers
</label>
</div>
</form>
</li>
</ul>
</div>
<div class="modal-footer">

View file

@ -44,6 +44,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
'readlineBindings': false,
'enableJSEmoji': (utils.isMobileUi() ? false : true),
'enableMathjax': false,
'enableAltSwitcher': true,
'customCSS': '',
"currentlyViewedBuffers":{},
});

View file

@ -247,7 +247,7 @@ weechat.directive('inputBar', function() {
$scope.iterCandidate = null;
// Left Alt+[0-9] -> jump to buffer
if ($event.altKey && !$event.ctrlKey && (code > 47 && code < 58)) {
if ($event.altKey && !$event.ctrlKey && (code > 47 && code < 58) && settings.enableAltSwitcher) {
if (code === 48) {
code = 58;
}