Skip to content

Commit

Permalink
[vim keymap] Move dialog to bottom of editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyguava authored and marijnh committed Dec 10, 2012
1 parent 0682373 commit 38d0c32
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions keymap/vim.js
Expand Up @@ -1769,7 +1769,7 @@
}
function dialog(cm, text, shortText, callback) {
if (cm.openDialog) {
cm.openDialog(text, callback);
cm.openDialog(text, callback, true /** bottom */);
}
else {
callback(prompt(shortText, ""));
Expand Down Expand Up @@ -1801,17 +1801,18 @@
function showConfirm(cm, text) {
if (cm.openConfirm) {
cm.openConfirm('<span style="color: red">' + text +
'</span> <button type="button">OK</button>', function() {});
'</span> <button type="button">OK</button>', function() {},
true /** bottom */);
} else {
alert(text);
}
}
function makePrompt(prefix, desc) {
var raw = '';
if (prefix) {
raw += prefix;
raw += '<span style="font-family: monospace">' + prefix + '</span>';
}
raw += '<input type="text" style="width: 20em"/> ' +
raw += '<input type="text"/> ' +
'<span style="color: #888">';
if (desc) {
raw += '<span style="color: #888">';
Expand Down

0 comments on commit 38d0c32

Please sign in to comment.