1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-01 16:57:45 +02:00

small fix

This commit is contained in:
Jfreegman 2014-02-21 22:02:16 -05:00
parent 9353c2078b
commit a4cb568558
3 changed files with 3 additions and 4 deletions

View File

@ -547,9 +547,9 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
self->x = x2;
/* Truncate note if it doesn't fit in statusbar */
uint16_t maxlen = x2 - getcurx(statusbar->topline) - (KEY_IDENT_DIGITS * 2) - 6;
uint16_t maxlen = x2 - getcurx(statusbar->topline) - (KEY_IDENT_DIGITS * 2) - 7;
if (statusbar->statusmsg_len > maxlen) {
statusbar->statusmsg[maxlen-1] = '\0';
statusbar->statusmsg[maxlen] = '\0';
statusbar->statusmsg_len = maxlen;
}

View File

@ -3,8 +3,6 @@
#include "toxic_windows.h"
#define KEY_IDENT_DIGITS 2
typedef struct {
uint8_t name[TOX_MAX_NAME_LENGTH];
uint16_t namelength;

View File

@ -26,6 +26,7 @@
#define N_DEFAULT_WINS 2 /* number of permanent default windows */
#define CURS_Y_OFFSET 3 /* y-axis cursor offset for chat contexts */
#define CHATBOX_HEIGHT 4
#define KEY_IDENT_DIGITS 2 /* number of hex digits to display for the pub-key based identifier */
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1