DDFileLister: When displaying a file description, remove/replace cursor movement characters, which can corrupt the display
DDFileLister: When displaying a file description, remove/replace cursor movement characters, which can corrupt the display
Merge request reports
Activity
assigned to @rswindell
added 1 commit
- 276f6226 - DDFileLister: Move call to removeOrReplaceSyncCursorMovementChars() to after...
- Resolved by Eric Oulashin
File descriptions aren't supposed to have cursor movements codes in the first place, so I'm curious how this is happening.
Are we talking about file summary/descriptions, or extended descriptions (e.g. imported from TIC or DIZ) here?
How'd these files get added to the filebase in the first place?
They're from extended descriptions from a diz. I uploaded them yo my BBS (for testing) using the ;UPLOAD coand. These are a couple examples:
Nelgin reportrd this; I downloaded these files from his BBS. He says he used addfiles eith the -diz option. I noticed these seem to at least have a / (newline) attribute.
Edited by Eric OulashinI imported adpack23.zip into vert and the extended description display fine, at least using the built file lister, in sbbs. I do see there are Ctrl-A codes for cursor-right positioning (which would need to be replaced with spaces, at minimum, for the original art to display correctly) and the conditional-newline sequence (Ctrl-A/) is also required for proper display matching the screen width provided in the SAUCE record of the FILE_ID.ANS file.
I'm not clear why these codes would be problematic for DDFileLister.
The cursor codes are problematic for DDMsgReader because, when using the scrolling ANSI interface, it writes the extended descriptions to the right of the file list; it doesn't expect the cursor to be moved when writing the description, so that currently is causing issues when displaying the descriptions, as part of the description ends up over the file list. Similar issues happen when viewing file info, where it uses a scrollable window on the screen (using frame.js). I think the best solution would be for DDFileLister to remove these cursor positioning codes so that they aren't a problem when writing the extended descriptions.
added 1 commit
- 705d7f9c - DDFileLister: Replace cursor-right codes in descriptions properly
Another example where the description looks bad when viewing file info without removing/replacing the cursor positioning codes:
The same when the cursor position codes are removed/replaced:
Edited by Eric OulashinMost of the Ctrl-A codes being stripped in this change should not actually exist in an extended description in the first place. So it just kind of looks like extra code/compares added for no reason.
Replacing a conditional new-line sequence with nothing (blank string), doesn't seem like the correct thing to do either.
All that said, I'll merge the change, but I expect you'll still have some problems with some imported/converted ANSI descriptions with this change.
I haven't done a thorough check. My concern was that if a file is imported (by addfiles with -diz), it might take the first line of the diz for the short 1-line description, and if some of these diz files have cursor control codes, the control codes could potentially be anywhere in the diz. I'm not sure if addfiles takes the first line of a diz for the short description though.
mentioned in commit c43549ff