Author Topic: Word Wrap not Working (MC Built-in TextViewer) !  (Read 2626 times)

total_annihilation00

  • Active Member
  • ***
  • Posts: 71
  • Tech Savant\ Envisioneering
    • View Profile
Word Wrap not Working (MC Built-in TextViewer) !
« on: December 01, 2024, 11:22:42 »
I'am using the Word Wrap (MC TextViewer) together /w setting it Dynamically, but still the text overflows out of the Window. Perhaps this can be fixed in a future version please? Sometimes changing the Encoding on top helps fix this but usually it overflows out into the horizontal scrollbar !  :(
« Last Edit: December 05, 2024, 04:22:19 by total_annihilation00 »
~The World's Deceit Has Raped My Soul, We Melt The Plastic People Down Then We Melt Their Plastic Town~


Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #1 on: December 01, 2024, 11:27:37 »
Im not seeing any wrap issue. I normally have that enabled..

Can explain more or give step to reproduce

total_annihilation00

  • Active Member
  • ***
  • Posts: 71
  • Tech Savant\ Envisioneering
    • View Profile
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #2 on: December 01, 2024, 11:35:44 »
It could be my custom WindowBlinds skinned ScrollBar that's 'causing the text to overflow to outside the Window area. It would be nice if the text was Word Wrapped To Window, as I read a lot of texts in MC ! I'am using a custom downloaded Google Font called "Audiowide" by the way...

P.S: I have reported a similar issue, the Icons in my Explorer Pane sometimes are cut off at the bottom, perhaps 'cause I use a custom Font & ScrollBar /w WindowBlinds 10 skinning app.
« Last Edit: December 01, 2024, 11:38:37 by total_annihilation00 »
~The World's Deceit Has Raped My Soul, We Melt The Plastic People Down Then We Melt Their Plastic Town~


Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #3 on: December 01, 2024, 11:53:55 »
So it cuts the text 1-2 character to late ?
The font I don't think is an issue but the Winblinds might be. might be that the program does not get the correct width size for the scrollbar

Might be possible to add option for setting an optional extra right margin.

total_annihilation00

  • Active Member
  • ***
  • Posts: 71
  • Tech Savant\ Envisioneering
    • View Profile
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #4 on: December 01, 2024, 12:09:49 »
So it cuts the text 1-2 character to late ?

I'll have to check, I think in some files it's a lot more (like the Word Wrap is completely disregarded, but I'll have to confirm later on this)....
P.S: Yeah I think it's 1-2 characters, I can verify.  :D
P.P.S: It's a whole lot more than 1-2 characters, in some cases, also that's the best-case scenario, in ASCII mode the Word Wrap doesn't work at all ! UTF-8 Mode is a lot more efficient though.

Might be possible to add option for setting an optional extra right margin.

That would be ideal, thanks !



I'll test in a fresh copy of MultiCommander & see if the Word Wrap is preserved… I'll report what I find… I suspect it doesn't recognize the font so it doesn't know how to wrap, but I'am just speculating… Word Wrap Fixed Width isn't applied until you relaunch the MultiDataViewer, but aside from that, it's working pretty well on 115 characters Fixed Width ! 😁 The default setting of 80 is probably best, I see no text overflow under this, so I'll keep it, till you add a Wrap To Window option !

✅ P.S: Please ensure that other Encodings also are Word Wrapped to Window, not just the UTF-8 which is usually the most reliable Word Wrapped Encoding.
« Last Edit: December 02, 2024, 04:21:16 by total_annihilation00 »
~The World's Deceit Has Raped My Soul, We Melt The Plastic People Down Then We Melt Their Plastic Town~


Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #5 on: December 02, 2024, 07:46:06 »
It just have to be able to draw the font. Then windows will report how big the area it was drawn on. So the size can be calculated so it know to wrap it or not.
So my bet is on WindowBinds. becuse they to some tricky hack. and if the scrollbar is not standard width, I can see program miss out of the size of the scrollbar and some calculation goes wrong


All encoding should be wrapped. except maybe binary. wrapping does not depend on what encoding there is. it depends on how long the text is when rendered

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #6 on: December 02, 2024, 08:05:05 »
Actually. You might be right about the font. or combination of both, It uses the average character width, and based the calculation on that.

That is becuse it is the fastest way. The TextViewer is very optimized to be able to handle very large files. And for files that are changed all the time. like when viewing live logfiles. For that I want it to be as fast as possible.
Not sure i want to change that. Hmmm If I do anything about it it will be an option to switch to more exact measurement, but that would be an opt-in option in that case.
« Last Edit: December 02, 2024, 08:27:39 by Mathias (Author) »

total_annihilation00

  • Active Member
  • ***
  • Posts: 71
  • Tech Savant\ Envisioneering
    • View Profile
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #7 on: December 02, 2024, 15:44:57 »
It's alright then, I understand. Besides, on 80 characters Fixed Width it works fine !  :D
« Last Edit: December 02, 2024, 16:03:56 by total_annihilation00 »
~The World's Deceit Has Raped My Soul, We Melt The Plastic People Down Then We Melt Their Plastic Town~


total_annihilation00

  • Active Member
  • ***
  • Posts: 71
  • Tech Savant\ Envisioneering
    • View Profile
Re: Word Wrap not Working (MC Built-in TextViewer) !
« Reply #8 on: December 05, 2024, 04:23:37 »
Thank you for the updates !!  8)
~The World's Deceit Has Raped My Soul, We Melt The Plastic People Down Then We Melt Their Plastic Town~