lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Wrap text along word boundaries with the command :enable-word-wrap

Open maxim-lbmv opened this issue 1 year ago • 0 comments

To make it easier to view long messages, you can use the text wrapping feature. But it works a little incorrectly, it transfers the text letter by letter, breaking the words, making it difficult to read the message.

Is it possible to change the behaviour of the wrap function so that it breaks text at word boundaries?

If there is a need to preserve the current behaviour, then you can add an argument to the command that will describe the desired behaviour. Below I have given an example of possible argument values.

NoWrap no wrapping will be performed.

WordWrap wrapping is done on word boundaries only. If a word is too long, it goes out of bounds.

WrapAnywhere wrapping is done at any point on a line, even if it occurs in the middle of a word.

Wrap if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.

maxim-lbmv avatar Apr 05 '24 18:04 maxim-lbmv