Redo commandline completion on edit (issue 6453096)

5 views
Skip to first unread message

jas...@gmail.com

unread,
Aug 8, 2012, 5:57:37 PM8/8/12
to mz...@google.com, thecom...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: mzero, thecomfyshell_googlegroups.com,

Description:
Previously editing the commandline would leave the completion markup.
This change fixes that

Please review this at http://codereview.appspot.com/6453096/

Affected files:
M static/js/shell.js


Index: static/js/shell.js
diff --git a/static/js/shell.js b/static/js/shell.js
index
520bbcf615926289f03211938f417ca4fa1e00ac..e56336ac0820c7dd849f950ea93b8e2f05a9a25e
100644
--- a/static/js/shell.js
+++ b/static/js/shell.js
@@ -188,7 +188,7 @@ define(['history', 'cwd', 'jobs', 'jquery'],
function(historyApi, cwd, jobs, $){
jobsRunning = true;
}
else {
- if (job !== 'ctx') {
+ if (job !== 'ctx' && job !== 'comp') {
j.setComplete(d.exitcode);
commandline.focus();
jobsDone = true;
@@ -291,11 +291,13 @@ define(['history', 'cwd', 'jobs', 'jquery'],
function(historyApi, cwd, jobs, $){
break;
};
}
+ requestRunComplete();
});
- commandline.keypress(function(e) {
+
+ function requestRunComplete() {
clearTimeout(checkTimer);
checkTimer = setTimeout(runComplete, 200);
- })
+ }

$(window).on('keydown', function(e) {
// commands valid no matter what the modifiers


mz...@google.com

unread,
Aug 8, 2012, 6:13:40 PM8/8/12
to jas...@gmail.com, thecom...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reply all
Reply to author
Forward
0 new messages