Handling for tab characters
modified: src/nms.c
This commit is contained in:
parent
b1d29cd6fe
commit
1ce3eaa7b1
@ -9,6 +9,7 @@
|
||||
|
||||
#define SPACE 32
|
||||
#define NEWLINE 10
|
||||
#define TAB 9
|
||||
|
||||
#define KNRM "\x1B[0m"
|
||||
#define KMAG "\x1B[35m"
|
||||
@ -47,6 +48,8 @@ int main(void) {
|
||||
if (c == NEWLINE) {
|
||||
++y;
|
||||
x = 1;
|
||||
} else if (c == TAB && x + 4 <= termSizeCols) {
|
||||
x += 4;
|
||||
} else if (isspace(c)) {
|
||||
if (++x > termSizeCols) {
|
||||
++y;
|
||||
|
Loading…
Reference in New Issue
Block a user