the status when we're in the file browser, since Pico doesn't.
(DLR)
do_cursorpos()
- - Simplify, and remove unneeded assert. (DLR)
+ - Remove unneeded assert. (DLR)
- configure.ac:
- Since we only use vsnprintf() now, remove the tests for
snprintf(). (DLR)
* display the current cursor position next time. */
void do_cursorpos(bool constant)
{
+ filestruct *f;
char c;
size_t i, cur_xpt = xplustabs() + 1;
size_t cur_lenpt = strlenpt(openfile->current->data) + 1;
assert(openfile->fileage != NULL && openfile->current != NULL);
- i = (openfile->current->prev != NULL) ?
- get_totsize(openfile->fileage, openfile->current->prev) : 0;
+ f = openfile->current->next;
c = openfile->current->data[openfile->current_x];
+
+ openfile->current->next = NULL;
openfile->current->data[openfile->current_x] = '\0';
- i += mbstrlen(openfile->current->data);
+
+ i = get_totsize(openfile->fileage, openfile->current);
+
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. */