aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2022-05-28 20:19:52 +0200
committerTheJackiMonster <thejackimonster@gmail.com>2022-05-29 00:25:33 +0200
commite5a4b1f9e99f73123622b462c29b22b37bb08751 (patch)
tree18477360c8bfb0fdb1e2b517e5c286d3a81cb7b7
parente56259e8766ea097e4f2b841584e2f6b20534464 (diff)
downloadmessenger-cli-e5a4b1f9e99f73123622b462c29b22b37bb08751.tar.gz
messenger-cli-e5a4b1f9e99f73123622b462c29b22b37bb08751.zip
Fixed cursor in messages text input and adjusted scroll view
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r--src/ui/messages.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/messages.c b/src/ui/messages.c
index 4b7520a..4d134e9 100644
--- a/src/ui/messages.c
+++ b/src/ui/messages.c
@@ -158,8 +158,8 @@ messages_event(UI_MESSAGES_Handle *messages,
158 158
159 if (y < 0) 159 if (y < 0)
160 messages->line_offset += y; 160 messages->line_offset += y;
161 else if (y + 1 >= height) 161 else if (y + 3 >= height)
162 messages->line_offset += y + 1 - height; 162 messages->line_offset += y + 3 - height;
163 163
164 if (messages->line_offset < 0) 164 if (messages->line_offset < 0)
165 messages->line_offset = 0; 165 messages->line_offset = 0;
@@ -247,6 +247,8 @@ messages_print(UI_MESSAGES_Handle *messages)
247 wprintw(messages->window, "%s", messages->text); 247 wprintw(messages->window, "%s", messages->text);
248 248
249 if (selected) wattroff(messages->window, attrs_select); 249 if (selected) wattroff(messages->window, attrs_select);
250
251 wmove(messages->window, height - 1, messages->text_pos);
250} 252}
251 253
252void 254void