edit.js: displaying filename on menubar

This commit is contained in:
minjaesong
2021-10-04 23:04:51 +09:00
parent ba71049335
commit fa953a682b

View File

@@ -109,13 +109,14 @@ function drawMain() {
con.addch(c); con.curs_right(); con.addch(c); con.curs_right();
} }
print(" "); // print(" ");
}); });
// fill rest of the space on the line // fill rest of the space on the line
con.color_pair(COL_BACK, COL_TEXT); con.color_pair(COL_BACK, COL_TEXT);
let cursPos = con.getyx(); let cursPos = con.getyx();
for (let i = cursPos[1]; i <= windowWidth; i++) { con.addch(179)
con.mvaddch(1, i, 0); for (let i = cursPos[1]+1; i <= windowWidth; i++) {
con.mvaddch(1, i, filename.codePointAt(i-cursPos[1]-1));
} }
// print line number // print line number
@@ -127,7 +128,7 @@ function drawMain() {
con.move(PAINT_START_Y, PAINT_START_X); con.color_pair(COL_TEXT, COL_BACK); con.move(PAINT_START_Y, PAINT_START_X); con.color_pair(COL_TEXT, COL_BACK);
} }
function drawMenubarBase(index) { /*function drawMenubarBase(index) {
con.curs_set(0); con.curs_set(0);
drawInit(); drawInit();
con.clear(); con.clear();
@@ -162,7 +163,7 @@ function drawMenubarBase(index) {
con.move(3 + (i % menuHeight), 2 + 12 * ((i / menuHeight)|0)); con.move(3 + (i % menuHeight), 2 + 12 * ((i / menuHeight)|0));
print(v); print(v);
}); });
} }*/
function drawTextLineAbsolute(rowNumber, paintOffsetX) { function drawTextLineAbsolute(rowNumber, paintOffsetX) {
let paintRow = rowNumber - scroll; let paintRow = rowNumber - scroll;