Skip to content

Commit

Permalink
fix corrupted display of scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Feb 6, 2025
1 parent fc77aea commit 68b03e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ void CRT_init() {

CRT_delay = 0;

CRT_hasColors = Display_init(term);
CRT_hasColors = Display_init();
if (CRT_hasColors) {
CRT_scrollHandle = strdup("█");
CRT_scrollHandleTop = strdup("▀");
CRT_scrollHandleBottom = strdup("▄");
CRT_scrollBar = strdup(" ");
CRT_scrollBar = strdup("\xC2\xA0");
} else {
CRT_scrollHandle = strdup("*");
CRT_scrollHandleTop = strdup("*");
Expand Down
8 changes: 4 additions & 4 deletions Display.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ void Display_clear() {
#if HAVE_CURSES
#else
void Display_manualWriteChstrAtn(int y, int x, CharType* chstr, int n) {
printf("\033[%d;%df", y+1, x+1, y, x, n);
printf("\033[%d;%df", y+1, x+1);
/*
char str[n];
for (int i = 0; i < n; i++) {
Expand Down Expand Up @@ -546,8 +546,8 @@ void Display_refresh() {
#endif

#if HAVE_CURSES
bool Display_init(char* term) {
CRT_term = newterm(term, stdout, stdin);
bool Display_init() {
CRT_term = newterm(NULL, stdout, stdin);
raw();
noecho();
if (CRT_delay)
Expand All @@ -574,7 +574,7 @@ bool Display_init(char* term) {
return false;
}
#else
bool Display_init(char* term) {
bool Display_init() {

tcgetattr(0, &stdoutSettings);
struct termios rawTerm = stdoutSettings;
Expand Down
2 changes: 1 addition & 1 deletion Prototypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void Display_bkgdset(int color);
void Display_beep();
int Display_getmouse(MEVENT* mevent);
void Display_refresh();
bool Display_init(char* term);
bool Display_init();
void Display_done();
void Dit_saveAs(Buffer* buffer, TabManager* tabs);
int Dit_open(TabManager* tabs, const char* name);
Expand Down

0 comments on commit 68b03e5

Please sign in to comment.