variar / klogg

Really fast log explorer based on glogg project
https://klogg.filimonov.dev
GNU General Public License v3.0
2.34k stars 206 forks source link

Add word wrap #99

Open valentijnpeters opened 5 years ago

valentijnpeters commented 5 years ago

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 commented 5 years ago

can't read: image

valentijnpeters commented 5 years ago

image

valentijnpeters commented 5 years ago

image

sken130 commented 3 years ago

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

dennis-siden commented 1 year ago

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

variar commented 1 year ago

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

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

Issomane commented 1 year ago

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!

variar commented 1 year ago

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.

PetbkA commented 1 year ago

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
variar commented 1 year ago

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.

PetbkA commented 1 year ago

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 commented 1 year ago

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

variar commented 1 year ago

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

PetbkA commented 1 year ago

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?

variar commented 1 year ago

Changes in build 23.06.0.1407: