klogg icon indicating copy to clipboard operation
klogg copied to clipboard

Add word wrap

Open valentijnpeters opened this issue 6 years ago • 15 comments

1 log line is approximately 1000 characters. So it's not possible to read everything. we have to scroll to the right too much.

Is there a way to configurate when there is a line break and the rest of the logline is put on the next so it's possible to read further in case desired.

more flexible and options/possibilities would be very comfortable.

valentijnpeters avatar Sep 11 '19 09:09 valentijnpeters

can't read: image

valentijnpeters avatar Sep 11 '19 09:09 valentijnpeters

image

valentijnpeters avatar Sep 11 '19 10:09 valentijnpeters

image

valentijnpeters avatar Sep 11 '19 10:09 valentijnpeters

Please put the button on the toolbar, so that we can quickly switch between having word wrap and not having word wrap.

sken130 avatar Jul 05 '21 03:07 sken130

Is there a large text editor with word wrap as fast and neat and compact as klogg??

dennis-siden avatar Apr 27 '23 06:04 dennis-siden

For windows there is EmEditor, but it is not free.

I am making some progress on word wrap, but no clear timeline yet

variar avatar Apr 27 '23 06:04 variar

For windows there is EmEditor, but it is not free.

I am making some progress on word wrap, but no clear timeline yet

Thanks @variar! This would be a huge lifesaver feature. Keep up the good work!

Issomane avatar May 23 '23 09:05 Issomane

In CI builds 23.06+ I've enabled experimental text wrap feature. It is in the view menu, and can be toggled with W key. Currently the wrapping algorithm is very basic, it doesn't check for word boundaries and just wraps lines at the edge of visible area. It is a building block for a more user friendly "word wrap" mode that will be implemented later.

There are a few drawing bugs, but selection, highlighters, marks, jumping from filtered view to main view should work.

variar avatar Jun 03 '23 14:06 variar

23.06.0.1400 Qt5 x64 - works pretty fine and fast. Problems noticed:

  1. Selection rectangle height doesn't adjust to line's height;
  2. Option state is being disabled on every file opening, even if it were enabled for the same file earlier. It's better to save state across all files

PetbkA avatar Jun 05 '23 05:06 PetbkA

For now text wrap is disabled on restarts to avoid scenario when enabling it leads to repeated crashes on startup

It definetely should be either a global setting or a per-file setting. Not sure which is better.

variar avatar Jun 05 '23 11:06 variar

It definetely should be either a global setting or a per-file setting

Global is better. Besides, I don't remember any text editor which kept it per-file

PetbkA avatar Jun 06 '23 03:06 PetbkA

23.06.0.1400 Qt5 x64 - found another bug: Search Results are being cut beyond results frame when wrap is disabled.

Enabling word wrap fixes the problem, but disabling wrap returns it again.

Update: just found out that problem is with log frame too

PetbkA avatar Jun 06 '23 09:06 PetbkA

23.06.0.1400 Qt5 x64 - found another bug: Search Results are being cut beyond results frame when wrap is disabled.

Might be fixed in 23.06.0.1405

variar avatar Jun 06 '23 09:06 variar

23.06.0.1405 Qt5 x64 Windows - if word wrap is disabled, horizontal scrolling beyond the visible area of the hightlighted line crashes klogg (Sentry report 356b2557-876d-468c-80eb-29f04d3dea76). Workaround - disable highlighter for this string or enable word wrap.

BTW, can you add flag for enabling/disabling word wrap for all files to klogg.ini/klogg.conf?

PetbkA avatar Jun 06 '23 10:06 PetbkA

Changes in build 23.06.0.1407:

  • fixed cut lines on horizontal scroll
  • fixed crash on horizontal scroll
  • added a persistent setting for default state of text wrap (Preferences->View)

variar avatar Jun 07 '23 07:06 variar