1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-02 22:36:44 +02:00

add buffer yanking, clean up input functions

This commit is contained in:
Jfreegman
2014-07-14 14:32:38 -04:00
parent 190e1e73e8
commit b23ae5a4c3
9 changed files with 150 additions and 124 deletions

View File

@ -20,6 +20,10 @@
*
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* needed for wcswidth() */
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
@ -847,7 +851,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
int y, x;
getyx(self->window, y, x);
(void) x;
int new_x = ctx->start ? x2 - 1 : ctx->pos;
int new_x = ctx->start ? x2 - 1 : wcswidth(ctx->line, ctx->pos);
wmove(self->window, y + 1, new_x);
wrefresh(self->window);