mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:13:01 +01:00
a few fixes and update version
This commit is contained in:
parent
1517cbb6cb
commit
e3400e095b
@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.65])
|
||||
AC_INIT([toxic], [0.2.3], [http://tox.im/])
|
||||
AC_INIT([toxic], [0.2.4], [http://tox.im/])
|
||||
AC_CONFIG_AUX_DIR(configure_aux)
|
||||
AC_CONFIG_SRCDIR([src/main.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
16
src/chat.c
16
src/chat.c
@ -297,15 +297,19 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
}
|
||||
|
||||
else if (key == KEY_HOME) { /* HOME key: Move cursor to beginning of line */
|
||||
ctx->pos = 0;
|
||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||
if (ctx->pos > 0) {
|
||||
ctx->pos = 0;
|
||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||
}
|
||||
}
|
||||
|
||||
else if (key == KEY_END) { /* END key: move cursor to end of line */
|
||||
ctx->pos = ctx->len;
|
||||
int end_y = (ctx->len / x2) + (y2 - CURS_Y_OFFSET);
|
||||
int end_x = ctx->len % x2;
|
||||
wmove(self->window, end_y, end_x);
|
||||
if (ctx->pos != ctx->len) {
|
||||
ctx->pos = ctx->len;
|
||||
int end_y = (ctx->len / x2) + (y2 - CURS_Y_OFFSET);
|
||||
int end_x = ctx->len % x2;
|
||||
wmove(self->window, end_y, end_x);
|
||||
}
|
||||
}
|
||||
|
||||
else if (key == KEY_LEFT) {
|
||||
|
@ -235,19 +235,24 @@ static void groupchat_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
}
|
||||
|
||||
else if (key == KEY_DC) { /* DEL key: Remove character at pos */
|
||||
del_char_buf_frnt(ctx->line, &ctx->pos, &ctx->len);
|
||||
if (ctx->pos != ctx->len)
|
||||
del_char_buf_frnt(ctx->line, &ctx->pos, &ctx->len);
|
||||
}
|
||||
|
||||
else if (key == KEY_HOME) { /* HOME key: Move cursor to beginning of line */
|
||||
ctx->pos = 0;
|
||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||
if (ctx->pos > 0) {
|
||||
ctx->pos = 0;
|
||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||
}
|
||||
}
|
||||
|
||||
else if (key == KEY_END) { /* END key: move cursor to end of line */
|
||||
ctx->pos = ctx->len;
|
||||
int end_y = (ctx->len / x2) + (y2 - CURS_Y_OFFSET);
|
||||
int end_x = ctx->len % x2;
|
||||
wmove(self->window, end_y, end_x);
|
||||
if (ctx->pos != ctx->len) {
|
||||
ctx->pos = ctx->len;
|
||||
int end_y = (ctx->len / x2) + (y2 - CURS_Y_OFFSET);
|
||||
int end_x = ctx->len % x2;
|
||||
wmove(self->window, end_y, end_x);
|
||||
}
|
||||
}
|
||||
|
||||
else if (key == KEY_LEFT) {
|
||||
|
@ -266,7 +266,7 @@ void prompt_init_statusbar(ToxWindow *self, Tox *m)
|
||||
snprintf(statusbar->nick, sizeof(statusbar->nick), "%s", nick);
|
||||
|
||||
/* temporary until statusmessage saving works */
|
||||
uint8_t *statusmsg = "Toxing on Toxic v.0.2.3";
|
||||
uint8_t *statusmsg = "Toxing on Toxic v.0.2.4";
|
||||
m_set_statusmessage(m, statusmsg, strlen(statusmsg) + 1);
|
||||
snprintf(statusbar->statusmsg, sizeof(statusbar->statusmsg), "%s", statusmsg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user