Discussion:
Wrapmode: wrap on Whitespace
Robert Gieseke
2014-01-15 10:41:04 UTC
Permalink
Hi,

would it possible to add a new Wrap mode to wrap only at whitespace,
SC_WRAP_WHITESPACE?
My use case is LaTeX files, where a command like \cite{reference} should
stay together and not be split at the style changes. It might also be
useful in other languages to keep something like some_list[i+1] together.

Best regards,
Robert
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2014-01-15 21:12:34 UTC
Permalink
would it possible to add a new Wrap mode to wrap only at whitespace, SC_WRAP_WHITESPACE?
Try implementing the mode near the end of LayoutLine by checking the mode (wrapState) as well as the styles.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Robert Gieseke
2014-01-23 11:34:12 UTC
Permalink
Hi Neil,
Post by Neil Hodgson
would it possible to add a new Wrap mode to wrap only at whitespace, SC_WRAP_WHITESPACE?
Try implementing the mode near the end of LayoutLine by checking the mode (wrapState) as well as the styles.
thanks for the pointer! The attached patch gives me the desired
behaviour for all three modes. Since I don't really know what I'm doing
there I don't know whether the definitions of SC_WRAP_WHITESPACE etc.
make sense (as they aren't really used) or if others are missing.

If this direction makes sense I'm happy to add documentation as well. I
worked against 3.3.7.

Best regards,
Robert
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2014-01-23 21:39:26 UTC
Permalink
thanks for the pointer! The attached patch gives me the desired behaviour for all three modes. Since I don't really know what I'm doing there I don't know whether the definitions of SC_WRAP_WHITESPACE etc. make sense (as they aren't really used) or if others are missing.
Scintilla.h is generated from Scintilla.iface (by scripts/HFacer.py) so that is where the master definition goes.
If this direction makes sense I'm happy to add documentation as well. I worked against 3.3.7.
A short explanation should be added to doc/ScintilllaDoc.html.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Robert Gieseke
2014-01-25 18:14:53 UTC
Permalink
Hi Neil,

attached is a revised diff (against current hg tip).

Thanks for your guidance,
Robert
Post by Neil Hodgson
thanks for the pointer! The attached patch gives me the desired behaviour for all three modes. Since I don't really know what I'm doing there I don't know whether the definitions of SC_WRAP_WHITESPACE etc. make sense (as they aren't really used) or if others are missing.
Scintilla.h is generated from Scintilla.iface (by scripts/HFacer.py) so that is where the master definition goes.
If this direction makes sense I'm happy to add documentation as well. I worked against 3.3.7.
A short explanation should be added to doc/ScintilllaDoc.html.
Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2014-01-25 21:48:35 UTC
Permalink
Post by Robert Gieseke
attached is a revised diff (against current hg tip).
Looks good. Won’t be committed for a few days, after 3.3.8 is released.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2014-02-02 08:15:18 UTC
Permalink
SC_WRAP_WHITESPACE committed as
https://sourceforge.net/p/scintilla/code/ci/b702204315f6d037586485fb7344ea5a97899cd8/

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...