Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to old method of computing terminal size as new method does not play nice with lldb #10026

Merged
merged 3 commits into from
Dec 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
More compilation fixes
  • Loading branch information
Mytherin committed Dec 18, 2023
commit bdc04675465dc6230a4076ca3a878ef07f7584b0
6 changes: 3 additions & 3 deletions tools/shell/linenoise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ struct searchMatch {
};

struct TerminalSize {
size_t ws_col = 0;
size_t ws_row = 0;
int ws_col = 0;
int ws_row = 0;
};

/* The linenoiseState structure represents the state during line editing.
Expand Down Expand Up @@ -619,7 +619,7 @@ static void abFree(struct abuf *ab) {
* to the right of the prompt. */
void refreshShowHints(struct abuf *ab, struct linenoiseState *l, int plen) {
char seq[64];
if (hintsCallback && plen + l->len < l->ws.ws_col) {
if (hintsCallback && plen + l->len < size_t(l->ws.ws_col)) {
int color = -1, bold = 0;
char *hint = hintsCallback(l->buf, &color, &bold);
if (hint) {
Expand Down
Loading