mirror of https://git.sr.ht/~rabbits/left
Better blank file
This commit is contained in:
parent
7bc0833241
commit
f84b620cc8
|
@ -3,4 +3,5 @@
|
|||
*png~
|
||||
*gif~
|
||||
theme.svg
|
||||
left
|
||||
left
|
||||
untitled.txt
|
||||
|
|
11
example.txt
11
example.txt
|
@ -1,13 +1,4 @@
|
|||
ajdfka
|
||||
a
|
||||
|
||||
Tabbed
|
||||
2Tabbed
|
||||
|
||||
int
|
||||
int
|
||||
int
|
||||
int
|
||||
|
||||
/* comment */
|
||||
|
||||
comment
|
||||
|
|
11
left.c
11
left.c
|
@ -412,7 +412,7 @@ drawdecor(Uint32 *dst)
|
|||
drawicon(dst, HOR * 8 - 7, y * 8, icons[view.y >= ls * y ? 5 : 4], selected >= ls * y ? 1 : 4, 0);
|
||||
if(GUIDES) /* ruler */
|
||||
drawicon(dst, RULER * 8, y * 8, icons[0], 4, 0);
|
||||
if(lineid < lmax) { /* line number */
|
||||
if(lineid <= lmax) { /* line number */
|
||||
drawicon(dst, 0 * 8, y * 8, font[lineid < 100 ? '.' - 32 : '0' + ((lineid / 100) % 10) - 32], lineid == selected ? 2 : 3, 0);
|
||||
drawicon(dst, 1 * 8, y * 8, font[lineid < 10 ? '.' - 32 : '0' + ((lineid / 10) % 10) - 32], lineid == selected ? 2 : 3, 0);
|
||||
drawicon(dst, 2 * 8, y * 8, font['0' + (lineid % 10) - 32], lineid == selected ? 2 : 3, 0);
|
||||
|
@ -596,15 +596,12 @@ selectoption(int option)
|
|||
void
|
||||
newtxt(void)
|
||||
{
|
||||
sel.from = 0;
|
||||
sel.to = 0;
|
||||
doc.text = (char *)malloc(TEXTSZ);
|
||||
doc.text[0] = '\n';
|
||||
doc.text[1] = '\0';
|
||||
doc.len = 2;
|
||||
doc.text[0] = '\0';
|
||||
doc.len = 0;
|
||||
scpy("untitled.txt", doc.name, 256);
|
||||
printf("Created: %s\n", doc.name);
|
||||
redraw(pixels);
|
||||
setselection(0, -1);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue