Re: [code] [textadept] Chars used for word_wrap

From: Mitchell <m.att.foicica.com>
Date: Thu, 9 Jan 2014 17:50:58 -0500 (Eastern Standard Time)

Hi Robert,

On Wed, 8 Jan 2014, Robert Gieseke wrote:

> Hi,
>
> is there a way to have word_wrap only occur only after spaces?
> With
> buffer.wrap_mode = buffer.WRAP_WORD
> lines break for example like \cmd{
> setting} in LaTeX instead of putting \cmd{setting} on a new line.
>
> I changed the word_chars to include backslash and braces but this seems
> only to be respected by move-by-word commands (though I would prefer to
> not have those as word_chars).
>
> Any pointers?

Scintilla is hard-coded to wrap on style changes if possible.
`src/Editor.cxx:2402` is responsible for this. I was able to comment out
that "else if" statement to get the "wrap on whitespace" effect you were
hoping for.

Neil might accept a patch to the wrap mode. For example, calling
SCI_SETWRAPMODE with a new WRAP_WORD_WHITESPACE constant would tell
Scintilla to not check for a style change, but rely on that last
conditional to break on spaces or tabs.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 09 Jan 2014 - 17:50:58 EST

This archive was generated by hypermail 2.2.0 : Fri 10 Jan 2014 - 06:28:05 EST