Skip to content

Commit

Permalink
fix fix space after first character #391
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 3, 2018
1 parent 6ad14f0 commit 827ada8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
10 changes: 6 additions & 4 deletions js/jquery.terminal-1.14.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sun, 29 Apr 2018 08:25:28 +0000
* Date: Thu, 03 May 2018 15:38:02 +0000
*/

/* TODO:
Expand Down Expand Up @@ -2243,6 +2243,7 @@
}
animation(true);
draw_prompt();
fix_textarea();
}
mobile_focus();
return self;
Expand Down Expand Up @@ -2457,17 +2458,18 @@
function debug(str) {
if (false) {
console.log(str);
//$.terminal.active().echo(str);
$.terminal.active().echo(str);
}
}
function input_event() {
debug('input ' + no_keydown + ' || ' + process + ' ((' + no_keypress +
' || ' + dead_key + ') && !' + skip_insert + ' && (' + single_key +
' || ' + no_key + ') && !' + backspace + ')');
// correct for fake space used for select all context menu hack
var val = clip.val().replace(/^ /, '');
// Some Androids don't fire keypress - #39
// if there is dead_key we also need to grab real character #158
// Firefox/Android with google keyboard don't fire keydown and keyup #319
var val = clip.val();
if ((no_keydown || process || ((no_keypress || dead_key) && !skip_insert &&
(single_key || no_key) && !backspace)) &&
val !== command) {
Expand Down Expand Up @@ -2870,7 +2872,7 @@
}
$.terminal = {
version: 'DEV',
date: 'Sun, 29 Apr 2018 08:25:28 +0000',
date: 'Thu, 03 May 2018 15:38:02 +0000',
// colors from http://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-1.14.0.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -2243,6 +2243,7 @@
}
animation(true);
draw_prompt();
fix_textarea();
}
mobile_focus();
return self;
Expand Down Expand Up @@ -2457,17 +2458,18 @@
function debug(str) {
if (false) {
console.log(str);
//$.terminal.active().echo(str);
$.terminal.active().echo(str);
}
}
function input_event() {
debug('input ' + no_keydown + ' || ' + process + ' ((' + no_keypress +
' || ' + dead_key + ') && !' + skip_insert + ' && (' + single_key +
' || ' + no_key + ') && !' + backspace + ')');
// correct for fake space used for select all context menu hack
var val = clip.val().replace(/^ /, '');
// Some Androids don't fire keypress - #39
// if there is dead_key we also need to grab real character #158
// Firefox/Android with google keyboard don't fire keydown and keyup #319
var val = clip.val();
if ((no_keydown || process || ((no_keypress || dead_key) && !skip_insert &&
(single_key || no_key) && !backspace)) &&
val !== command) {
Expand Down
10 changes: 6 additions & 4 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sun, 29 Apr 2018 08:25:28 +0000
* Date: Thu, 03 May 2018 15:38:02 +0000
*/

/* TODO:
Expand Down Expand Up @@ -2243,6 +2243,7 @@
}
animation(true);
draw_prompt();
fix_textarea();
}
mobile_focus();
return self;
Expand Down Expand Up @@ -2457,17 +2458,18 @@
function debug(str) {
if (false) {
console.log(str);
//$.terminal.active().echo(str);
$.terminal.active().echo(str);
}
}
function input_event() {
debug('input ' + no_keydown + ' || ' + process + ' ((' + no_keypress +
' || ' + dead_key + ') && !' + skip_insert + ' && (' + single_key +
' || ' + no_key + ') && !' + backspace + ')');
// correct for fake space used for select all context menu hack
var val = clip.val().replace(/^ /, '');
// Some Androids don't fire keypress - #39
// if there is dead_key we also need to grab real character #158
// Firefox/Android with google keyboard don't fire keydown and keyup #319
var val = clip.val();
if ((no_keydown || process || ((no_keypress || dead_key) && !skip_insert &&
(single_key || no_key) && !backspace)) &&
val !== command) {
Expand Down Expand Up @@ -2870,7 +2872,7 @@
}
$.terminal = {
version: 'DEV',
date: 'Sun, 29 Apr 2018 08:25:28 +0000',
date: 'Thu, 03 May 2018 15:38:02 +0000',
// colors from http://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

0 comments on commit 827ada8

Please sign in to comment.