Post by Stefan on Apr 17, 2022 2:49:45 GMT -5
Hi George,
The latest version of the TRACK feature is really fabulous. Thank you very much.
It feels like the feature isn't far off release status, so I placed this here, as it really isn't a "Contributed macro" discussion any more.
First a documentation question.
Does loading or RELOADing a file clear the TRACK history? I think it does (which is good). If it doesn't, it probably should.
The documentation for TRACK/TRACKF should probably mention this.
In testing I noticed some odd effects...
(1) No messages
If you press the (TRACK) or (TRACKF) key when there are is no TRACK history yet, NO message occurs.
(2) Cursor is left somewhere along the command line
Load a file
Issue FIND <something> (pick a <something> that occurs on multiple 'pages' of the file. Note that the cursor is on command line behind the <something>)
Press RFIND key a few times to step/page down the file
Press (TRACK) a few times until you're back at the start page or "No further TRACK entries" appears
All works great, with the cursor on the, now empty, command line, but still in the column after the <something>. Should probably be at colunm 1 of the command line.
a) Issue RESET TRACK
If you press the (TRACK) key, you see the message "No further TRACK entries"
But if you press the (TRACKF) key, it corrupts the display.
I run with COLS ON for convenience. So the top 4 lines on my display are usually
but after a (TRACKF) there's an extra line between the 'COLS' and 'Top of Page'. It shows a 'blank' in the screen shot, but appears as a repeat of whatever was the first line before.
In this example, I see two 'Top of Page' lines.
b) The same happens if you do as in (2) above, but instead of TRACKing all the way back to the start, you just TRACK back one step/page and the press (TRACKF).
Spot the extra line at the top of the screen.
c) Issue FIND <something>
Press RFIND key a few times to step/page down the file
Press (TRACKF)
I know this is daft, but it results in message "TRACK Top-of-Screen line no longer exists"
d) I have also experienced, but can't reliably reproduce, this.
Press RFIND key a few times to step/page down the file
Press (TRACKF)
I know this is daft, but it results in message "TRACK Top-of-Screen line no longer exists"
d) I have also experienced, but can't reliably reproduce, this.
Build a TRACK history (as in (2) above)
Issue RESET TRACK
Press (TRACKF)
Press (TRACKF)
(TRACKF) tries to jump forward anyway.
At one point, the 'data' portion only filled half my screen and (TRACKF) placed the cursor way below the 'Bottom of Screen' marker.
(This may have involved some 'excluded lines' on the display. I'm still trying to reproduce this.)
Hope this helps you to to track down the gremlin(s).
(This next bit is very tricky and should perhaps remain unchanged and merely acknowledged by you with a shrug of your shoulders)
I'm still teasing(!) the new logic with excluded lines.
You seem to 'track' the top line on the display by 'data line', and so far, it is correct for every case I've tried.
But the cursor seems to be positioned PHYSICALLY on the screen rather than tied to data line.
For example:
(My window sizes allows 60 'data' lines to be displayed per page.)
The display is showing Line NUMBER 3 as the top line on the page and line NUMBER 62 is the last visible line on that page.
I enter a FIND <something> command (which will jump to another page) but don't press <ENTER> yet.
I also enter a XX line command on lines 10 and 19 (ie. 10 lines will be excluded) block but still don't press <ENTER>
I change some data on line 44, (which is PHYSICALLY the 42nd line on the page), leaving the cursor on that line and now press <ENTER>
I assume that the execution sequence is: XX..XX block is done first, then TRACK capture, then the FIND command.
So at the time of the <ENTER> key...
- top of page is line number 3
- cursor is on data line 44 column <whatever>, which is PHYSICAL line 42
Assuming the XX..XX block is resolved first, then TRACK should (logically!) inherit this situation:
- top of page is line number 3
- cursor is on data line 44 column <whatever>, which is now PHYSICAL line 33
FIND executes and jumps to a new page, positions cursor, etc etc.
User presses the (TRACK) key and
- top of page is back on line number 3.
- lines 10 to 19 are replaced by a single '---<00010>--- ' marker line, as expected.
- cursor is on line number 53 column <whatever>
So the column is correct but the line is offset by the 10 excluded lines. In short, the cursor is on PHYSICAL line 42, as before.
Maybe(!) TRACKing the cursor line the same way you track the ToP line would help?
As I said, this is very tricky with one block of execuded lines, let alone if several separate excluded lines are present.
I haven't tested I, N, R, D, etc line cmds because they change the data as well as the display, whilst X is unique in only changing the display.
I wouldn't blame you if you just 'shrug shoulders'!
Afterall, the user knows that they entered line commands that changed the distance between Top of Page and the cursor's position.