|
Post by Stefan on Nov 13, 2014 12:06:51 GMT -5
Bug: Non-text files - Display and cursor position error
Affects v8.1.4311 v7.1.4050 System: Windows 7 Pro, SP1, 64-bit
To reproduce: 1) Open a non-text file, e.g. JPG or MP3, etc 2) Note that, depending on window width, a few columns on the right are blank - typically 2+ cols. 3) Drag the right window boundary to make the display wider and the number of these "blank" columns increases. 3) Switch "HEX ON". Then switch "HEX OFF". 4) Notice how some of the HEX display is still visible in those previously "blank" areas at the right edge of the display. 5) Place the cursor within these columns and press the DELETE key. 6) Note that the effective cursor position is several characters to the left of where you placed it. I've tried it with several different fonts in the OPTIONS dialog and the problem persists.
HOWEVER... this is working fine on v7.1.4050 and v8.1.4311 under Windows XP where the non-proportional fonts do indeed display properly (all cols properly aligned vertically). Under Win7Pro SP1 64-bit, using the same fonts, the characters do not align cleanly vertically. Perhaps this causes the "display line length" issue as some symbols appear narrower than a standard non-prop character. So it may not be an SPFLite error, just some difference in the way the the fonts are rendered?
|
|
|
Post by George on Nov 13, 2014 15:03:27 GMT -5
Stef: I can almost guarantee this is because you are using a font that does NOT HANDLE all 256 possible characters. Try switching to one that does, like any of the Raster fonts available in the optional font download package. If the font you are using does not handle all 256 characters, and you choose to load binary files like JPG (God only knows why you would) then you can be absolutely certain your display will be screwed up, and there's nothing whatsoever that can be done to 'fix' this for you.
George
|
|
|
Post by Stefan on Nov 16, 2014 9:13:35 GMT -5
Hi George,
Quick answer first - Why display binary files? Because SPFLITE gives me an easy way to see content in HEX and character format which can be handy when poking about in file headers, looking for eye catchers in a modules, etc.
As you said, the problem is font related. I didn't try all of those in the font package, but RASTER works as expected while many of the others do not. There is definitely a difference in the way this is handled by Win7 and Win/XP. Anyway, issue closed. Thank you.
|
|
|
Post by George on Nov 16, 2014 12:00:29 GMT -5
Robert: Extending the Mark lines through the hex portion -- I'll have a look at.
As to line numbers being hex offsets - offsets from what? Beginning of file? What if the file isn't a binary file, just a TXT file with some embedded weird characters. Yes, I know, yet another Profile option. But that doesn't matter, this will never happen regardless, there's just way too many dependencies on the line number field and how it is used.
George
|
|
|
Post by George on Nov 16, 2014 12:56:11 GMT -5
Robert: You're just making it into a different kind of difficult. I'd now have to track the byte offset for each line as I load it and keep that with the line data structure.
Then there is the question of what happens as line data is altered, is the offset to represent the current state of the data, or the state at last load?
What happens on SAVE, does that mean re-calcing the offsets? What to do when RECFM is altered, EOL is altered, etc. etc. This could get very ugly.
George
|
|
|
Post by George on Nov 17, 2014 10:43:24 GMT -5
My bet is the profile you changed was locked, that's why it wasn't saved.
Regardless, I've no inclination to make a text editor like SPFLite into a swiss army knife tool by adding all this hex/offset support. As to it being ugly already, you bet, and you probably don't know the half of it. Piling on another layer of complexity is just asking for problems. I can certainly see why some would like it, but there are specialty hex browsers fully capable of looking after this need. Ain't gonna happen. Ain't gonna be considered.
George
|
|
|
Post by Stefan on Nov 17, 2014 15:33:36 GMT -5
You're both right. There's products already out there that specialise in this area, so bending SPFLite to do this sort of thing isn't necessary. In my mainframe days, I used BROWSE with HEX display for occasional 'peek'ing (old habits die hard). :-)
|
|
|
Post by George on Nov 18, 2014 11:14:39 GMT -5
Robert: Yes, now with BROWSE being an untouchable mode, doing the non-resident approach would be workable, which wasn't true for things before. I still have to wonder how much call there is for this. 2 gig address space handles a pretty huge file, and lets Windows paging handle the IO. Biggest advantage would be the avoidance of reading the whole file just to get the first screen up and going.
George
|
|