Code review comment for lp:~jamalta/gwibber/298898

Revision history for this message
Jamal Fanaian (jamalta) wrote :

> The implementation is not yet complete imho; at least we should do two things:
>
> 1. fix the case when the user starts typing while he is at some pos < len ? I
> think when that happens we should reset the pos to len so the changed text
> gets saved as the new "current" (topmost) text.
>
> 2. the history buffer shouldn't grow indefinitely; please constraint it to
> 20-50 messages; consider to make the history buffer size configurable.

I will work on a fix for the 2nd issue.

Regarding the 1st issue, are you talking about the user typing something when they move up the buffer (pos < len) and then move again, thus losing what they typed? I think if the buffer gets switched to "current" (pos = len), it might confuse the user as they are now at the end of the buffer without realising it. I can think of one alternative, which is to save changes to the position when the user moves from it. This would end up working as it works when scrolling up and down the bash history. Which way of doing it do you think is better? I have implemented the first method, but I don't think it is the best way of doing things.

Thanks for your input. I really appreciate it, as it is very helpful.

« Back to merge proposal