[Konsole-devel] Review Request: Do not (sometimes) delete the bottom line of screen after resizing

Jekyll Wu adaptee at gmail.com
Wed Sep 21 14:14:02 UTC 2011



> On Sept. 12, 2011, 12:49 p.m., Gu Rui wrote:
> > Sorry that my last review on this is only partly correct. The resize code is right as long as Wu's patch applied. I have investigated the code and found the code never use screenLines[lines]. cuY and _bottomMargin is never beyond lines-1(Screen::setCursorY and Screen::cursorDown and Screen::setMargins). Screen::copyFromScreen only copy the first lines of screenLines to dest.(let startLine=0 and count=lines could make it more clear)
> > 
> > I still think screenLines = new ImageLine[lines+1] is just to cope with lines=0. So we can at least do something with screenLines. However, if we are careful, that extra line could be eliminated.

Thanks for your investigation. I think you are right on the explanation of "screenLines = new ImageLine[lines+1];"

If nobody objects, I will commit this one-line patch sometime later. I think that would be better than current situation, and if regression is found later it can always be reverted easily.


- Jekyll


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102177/#review6440
-----------------------------------------------------------


On Aug. 2, 2011, 6:51 a.m., Jekyll Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102177/
> -----------------------------------------------------------
> 
> (Updated Aug. 2, 2011, 6:51 a.m.)
> 
> 
> Review request for Konsole.
> 
> 
> Summary
> -------
> 
> This patch eliminate the problem described in comment #1 of bug #192221. However,  I am not sure that patch is really correct and would not cause new problems, because I do not quite understand why the Screen class always allocate spaces for N+1 lines when it is set to has N lines.
> 
> 
> This addresses bug 192221.
>     http://bugs.kde.org/show_bug.cgi?id=192221
> 
> 
> Diffs
> -----
> 
>   src/Screen.cpp ecd1642 
> 
> Diff: http://git.reviewboard.kde.org/r/102177/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jekyll
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20110921/e5975a31/attachment.html>


More information about the konsole-devel mailing list