mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
some fixes to vi
This commit is contained in:
parent
cf42631655
commit
32927521b0
3 changed files with 12 additions and 6 deletions
|
|
@ -2217,6 +2217,7 @@ clite.tty = {
|
|||
}else{
|
||||
clite.console.drawAt(updateX,updateY,t.data[updateY][updateX]);
|
||||
}
|
||||
clite.console.setCursor(t.x,t.y);
|
||||
},
|
||||
popLine:function(t) {
|
||||
var off = -1;
|
||||
|
|
@ -2571,6 +2572,7 @@ clite.console = {
|
|||
clite.console.data.vgaio.writeSet(2,clite.console.data.cursor[0],clite.console.data.cursor[1],false);
|
||||
clite.console.data.cursor[0] = clite.console.data.cursor[2];
|
||||
clite.console.data.cursor[1] = clite.console.data.cursor[3];
|
||||
//clite.console.data.vgaio.write(clite.console.data.cursor[0],clite.console.data.cursor[1],'_');
|
||||
clite.console.data.vgaio.writeSet(2,clite.console.data.cursor[0],clite.console.data.cursor[1],true);
|
||||
},
|
||||
setCursor:function(x,y) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ return Object.create({
|
|||
KEY_SHIFT:-2,
|
||||
KEY_TAB:'\t',
|
||||
KEY_DL:String.fromCharCode(127),
|
||||
KEY_BACKSPACE:String.fromCharCode(8),
|
||||
KEY_BACKSPACE:8,
|
||||
KEY_CONTROL:-1,
|
||||
KEY_PPAGE:-7,
|
||||
KEY_NPAGE:-8,
|
||||
|
|
|
|||
14
clite/vi.js
14
clite/vi.js
|
|
@ -120,11 +120,9 @@ Options:
|
|||
var ct = cursor_line+','+cursor_col;
|
||||
curses.move(rows-2,cols-(ct.length+5));
|
||||
curses.printw('%s',ct);
|
||||
if (cmd_buff != '') {
|
||||
curses.move(rows-1,0);
|
||||
curses.move(rows-1,0);
|
||||
if (cmd_buff != '')
|
||||
curses.printw('%s',cmd_buff);
|
||||
}
|
||||
//curses.move(cursor_line,cursor_col);
|
||||
}
|
||||
|
||||
function prepFile(fd) {
|
||||
|
|
@ -334,8 +332,14 @@ Options:
|
|||
showAt(topLine);
|
||||
cmd_buff = '';
|
||||
break;
|
||||
case curses.key.KEY_BACKSPACE:
|
||||
if (cmd_buff.length > 0) {
|
||||
cmd_buff = cmd_buff.substring(0,cmd_buff.length-1);
|
||||
showAt(topLine);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (key.length == 1)
|
||||
if (typeof key === 'string' && key.length == 1)
|
||||
cmd_buff+=key;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue