diff --git a/ChangeLog b/ChangeLog index a07272e9b4a40d286bd4012fd97ebac6a78e738e..d33221d1282866410fa081e002bd253863702b64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -245,6 +245,8 @@ CVS code - edit_add() - Rename to edit_draw(), and rename parameter yval to line. (DLR) + do_cursorpos() + - Remove unneeded assert. (DLR) do_yesno() - Make mouse clicks on the Yes/No/All shortcuts work properly when the MORE_SPACE flag is set. (DLR) diff --git a/src/prompt.c b/src/prompt.c index 3d017ad97183e13fe79b6dd690cb46a40854e5c6..3c2c91c3bf04fa7d17c1106f28a006573b670f98 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -779,7 +779,7 @@ void update_statusbar_line(const char *curranswer, size_t index) size_t start_col, page_start; char *expanded; - assert(prompt != NULL && index <= strlen(buf)); + assert(prompt != NULL && index <= strlen(curranswer)); start_col = strlenpt(prompt) + 1; index = strnlenpt(curranswer, index); diff --git a/src/text.c b/src/text.c index bdd9050a5828ef2e6d31a741d8dc2a04f6b9c395..487fd7443233aab43f9ed91b63ccd1e42dd2f1d3 100644 --- a/src/text.c +++ b/src/text.c @@ -1019,7 +1019,7 @@ void backup_lines(filestruct *first_line, size_t par_len) * current and filebot if filebot is the last line in the * paragraph. */ assert(par_len > 0 && openfile->current->lineno + par_len <= - filebot->lineno + 1); + openfile->filebot->lineno + 1); /* Move bot down par_len lines to the line after the last line of * the paragraph, if there is one. */ diff --git a/src/winio.c b/src/winio.c index 2b228cfbebdc5d2f6577f8811d48ac1775da7a01..794c8965e95bab6b9a95d6421e39c54454df137c 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2901,10 +2901,6 @@ void do_cursorpos(bool constant) openfile->current->data[openfile->current_x] = c; openfile->current->next = f; - /* Check whether totsize is correct. If it isn't, there is a bug - * somewhere. */ - assert(openfile->current != openfile->filebot || i == openfile->totsize); - if (constant && disable_cursorpos) { disable_cursorpos = FALSE; return;