Skip to content

Conversation

@frostmorn
Copy link
Collaborator

No description provided.

@frostmorn frostmorn added the wip label Nov 2, 2025
@frostmorn frostmorn removed the wip label Nov 3, 2025
@frostmorn frostmorn requested a review from alder November 3, 2025 17:58
@alder
Copy link
Contributor

alder commented Nov 8, 2025

Also, I think application should:

  1. Configure the canvas size properly. Currently we have lot of unused space on the screen (see attached photo).
  2. Display message like "[File is empty]" for empty files.
  3. Correctly handle opening of a binary file (or with non-UTF8 encoding).

txt-files for the testing can be found here test-txts.zip.

image

@frostmorn
Copy link
Collaborator Author

Also, I think application should:

1. Configure the canvas size properly. Currently we have lot of unused space on the screen (see attached photo).

about this part, we've a sort of toolbar at bottom area, meant to display some maybe minimal progress, some additional data. is evaluated inside draw method and yeh, if line don't fit, it won't be displayed, though it looks a bit worse than expected, maybe I wasn't that precise, would check

@frostmorn
Copy link
Collaborator Author

other 2 points, 2., I guess that won't be really hard, with binary 've to do more than those,
most binary files are about like lots of \0 symbols inside whose a bit fucked up by standard functions, so would require some preprocessing of it, maybe turning stuff into a hex view, which is, would be cool, but, I feel about it more like enhancement feature

@frostmorn
Copy link
Collaborator Author

anyways, thanks for feedback, would try to improve it :)

@frostmorn frostmorn requested a review from alder November 9, 2025 00:54
@alder
Copy link
Contributor

alder commented Nov 10, 2025

  1. Why scrolling is enabled for case when whole file is already displayed on the screen? Checked with file 'latin.txt'.
  2. Open file 'long_multiplelines.txt'. Press → (next page), then ← (previous page). Repeat this combo 5 times. Then try to repeat one more time and, instead of text, empty screen is displayed.
  3. One additional thing – after each repetition of →← you will return to the other position in the file.

@frostmorn frostmorn added the wip label Nov 12, 2025
@alder
Copy link
Contributor

alder commented Nov 13, 2025

Most of the test files works perfect 🙂 But.
Open 'very_long_line.txt' and scroll (by ↓) to the end. Press ↓ one more time and then app freezes.

@alder
Copy link
Contributor

alder commented Nov 30, 2025

If user tries to open empty file ('empty.txt'), application crashes and Keira going to reboot.
Log:

[ 0000049941 ][ Lilka V2 ][ ␛[1;32mINFO ␛[0m ]-> Created app Text Viewer at 0, 24 with size 280x216 on core 0
[ 0000049942 ][ Lilka V2 ][ ␛[1;32mINFO ␛[0m ]-> Toolbar: Adding a new page. New page count : 1
[ 0000049942 ][ Lilka V2 ][ ␛[1;32mINFO ␛[0m ]-> Toolbar: Adding a new page. New page count : 2
[ 0000049942 ][ Lilka V2 ][ ␛[1;32mINFO ␛[0m ]-> Toolbar: Adding a new page. New page count : 3
[ 0000049956 ][ Lilka V2 ][ ␛[1;32mINFO ␛[0m ]-> Starting app Text Viewer
[ 0000049958 ][ Lilka V2 ][ ␛[1;32mINFO ␛[0m ]-> Suspending app FileManager (state = 2)
Guru Meditation Error: Core  0 panic'ed (IntegerDivideByZero). Exception was unhandled.

Core  0 register dump:
PC      : 0x420236c3  PS      : 0x00060630  A0      : 0x82022866  A1      : 0x3fcc40e0  
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x3fcc415c  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x3fca42cc  A8      : 0x820236b4  A9      : 0x3fcc40c0  
A10     : 0x3fcc415c  A11     : 0x3c1aaa4d  A12     : 0x00000000  A13     : 0x00000000  
A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x0000000a  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffa  


Backtrace: 0x420236c0:0x3fcc40e0 0x42022863:0x3fcc4150 0x42023822:0x3fcc4190 0x42023b1b:0x3fcc41b0 0x420260ec:0x3fcc41d0




ELF file SHA256: 6353cbdf1de8c102

Rebooting...

Decoded backtrace:

keira/src/apps/txtviewer/txtviewer.cpp:142
keira/src/apps/txtviewer/toolbar.cpp:24
keira/src/apps/txtviewer/txtviewer.cpp:76
keira/src/apps/txtviewer/txtviewer.cpp:69
keira/src/keira/app.cpp:49

}

String TxtViewerApp::onGetStrFontSize() {
return StringFormat("Font SIZE %d C(-) A(+)", fontSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "D(-)".

return StringFormat("Font SIZE %d C(-) A(+)", fontSize);
}
String TxtViewerApp::onGetStrFontSpacing() {
return StringFormat("Font SPACE %d C(-) A(+)", fontSpacing);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "D(-)".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants