Initial work on last-read-position feature

Print dashes on the position we last left off in a chat window.
So far the number of dashes is hardcoded, and the feature only works in
chat windows.

Regards https://github.com/profanity-im/profanity/issues/1238
This commit is contained in:
Michael Vetter
2019-12-13 12:05:24 +01:00
parent 9bb2d7f95e
commit 14f25992c3
6 changed files with 59 additions and 0 deletions

View File

@@ -656,6 +656,14 @@ ui_focus_win(ProfWin *window)
cmd_ac_remove_form_fields(confwin->form);
}
// TODO: if old win is chatwin; and has lastreadline; then remove that line
if (old_current->type == WIN_CHAT) {
ProfChatWin *chatwin = (ProfChatWin*)old_current;
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
//win_update_entry_message_real(old_current, chatwin->barejid, "$$$");
win_remove_entry_message(old_current, chatwin->barejid);
}
if (window->type == WIN_CONFIG) {
ProfConfWin *confwin = (ProfConfWin*)window;
cmd_ac_add_form_fields(confwin->form);