patchGNU Octave - Patches: patch #8091, Align terminal window contents...

 
 

patch #8091: Align terminal window contents with bottom of view

Submitted by:  Dan Sebald <sebald>
Submitted on:  Mon 24 Jun 2013 01:26:29 AM UTC  
 
Category: NonePriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: NoneOpen/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 05 Nov 2013 03:28:46 PM UTC, comment #9:

Please also see the additional change I posted to the maintainers list that attempts to compute the number of lines (and columns) that can be completely displayed. As it is now, it seems we are computing the number of lines including any fractional lines, and then rounding up, so we display the partial line at the top when aligning at the bottom.

Instead of sometimes aligning at the top and sometimes at the bottom, it seems simpler to me to just compute a max number of lines or columns that will completely fit in the window.

John W. Eaton <jwe>
Project Administrator
Tue 05 Nov 2013 07:17:09 AM UTC, comment #8:

Neither is the best solution. I think I may have tried a new patch that aligns at the top until the window is full and then align at bottom. At the time it seemed more work and uncertainty than warranted compared to other issues. In a future version this could be done more thoroughly.

What if in the short term the GUI code puts a CR-LF at the start of the data stream upon creating the terminal window object? I doubt many users would pay much attention to the extra space, and once it is past the top of the window certainly won't notice.

Dan Sebald <sebald>
Tue 05 Nov 2013 05:48:50 AM UTC, comment #7:

Do we really want to truncate the first line of the startup message ("GNU Octave, version 3.7.7+", see attached screenshot in my comment #5)?

Torsten <ttl>
Project Member
Tue 05 Nov 2013 04:26:49 AM UTC, comment #6:

I applied the patch and pushed it to savannah. It seems to work fine for me. Sorry about the long delay.

John W. Eaton <jwe>
Project Administrator
Sat 29 Jun 2013 11:45:11 AM UTC, comment #5:

The top line is always truncated even at start up when the full height of the terminal is not used (screenshot attached). We should avoid truncating the top line of the octave start up message. Is there a way to start the alignment at the bottom line only when the cursor reaches the bottom line?

(file #28450)

Torsten <ttl>
Project Member
Mon 24 Jun 2013 09:09:55 PM UTC, comment #4:

I found a couple other places that look as though they should be offset from the top which is derived from the lower-left corner (i.e., it was assumed the top was 0). One of theme is used by the cursor code to erase the area to give the appearance of blinking. In other words, the cursor code was repainting an area about eight pixels further down. Please give the attached changeset a try.

I'm not sure what the preference is generally, but the other apps with alignment from top don't have the last line as the main area of activity. Editors like Geany and such usually have activity going on in the center of the window. Do a search, for example, and it will position the found item more toward the center of the window.

(file #28403)

Dan Sebald <sebald>
Mon 24 Jun 2013 06:59:28 PM UTC, comment #3:

That makes me wonder whether we should fall back on solution (1) (top align and displaying one line less). Other programs with embedded terminal are behaving like this, too (e.g. Geany).

Torsten <ttl>
Project Member
Mon 24 Jun 2013 06:40:14 PM UTC, comment #2:

I had something similar except when the cursor was in the last line. Then that went away when I tweaked the code. It was something like the lower half of the cursor was overwritten by some white hunk of data...like there might be a bad memcopy as part of scrolling. But that scrolling is a window-wide operation so one would think it should cover the whole bottom half of the line, not just the cursor. This is the reason I tried not changing too much; I'll have to think about this one.

Dan Sebald <sebald>
Mon 24 Jun 2013 05:58:10 PM UTC, comment #1:

Thanks for the patch.

On my system, the cursor is truncated (block and Ibeam, also when not in last line, please refer to attached image) and the cursor stops blinking.

(file #28400)

Torsten <ttl>
Project Member
Mon 24 Jun 2013 01:26:29 AM UTC, original submission:

Currently the terminal window in the GUI aligns the text contents with the top edge of the view. That sometimes leaves the bottom edge on top of a line depending upon how the GUI window/app is sized manually. The result is that the command line where there is most activity is visually obstructed.

The attached changeset will make the alignment at the bottom. Basically, everywhere I saw the top-left corner of the view used directly I changed it to computing the top indirectly as the bottom minus 2 times the margin minus the font height times the number of lines. I had to do some adjusting to find a good result, but the changeset seems about right.

Dan Sebald <sebald>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #28450:  terminal.png added by ttl (24kB - image/png)
file #28403:  octave-terminal_alignment-2013jun24.patch added by sebald (5kB - application/octet-stream)
file #28400:  cursor.png added by ttl (1kB - image/png)
file #28396:  octave-terminal_alignment-2013jun23.patch added by sebald (3kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by ttl (Updated the item)
  • -unavailable- added by sebald (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 Nov 2013 04:26:49 AM UTCjweStatusNone=>Done
      Open/ClosedOpen=>Closed
    Sat 29 Jun 2013 11:45:11 AM UTCttlAttached File-=>Added terminal.png, #28450
    Mon 24 Jun 2013 09:09:55 PM UTCsebaldAttached File-=>Added octave-terminal_alignment-2013jun24.patch, #28403
    Mon 24 Jun 2013 05:58:10 PM UTCttlAttached File-=>Added cursor.png, #28400
    Mon 24 Jun 2013 01:26:29 AM UTCsebaldAttached File-=>Added octave-terminal_alignment-2013jun23.patch, #28396

    Back to the top


    Powered by Savane 3.1-cleanup