This can be solved by using char wrap rather than word wrap, I think we can add a global option to select whether word wrap or char wrap should be used.
Here's my patch, it worked for me under Ubuntu 12.04.
thanks!
Index: lib/pwiki/WikiTxtCtrl.py
===================================================================
--- lib/pwiki/WikiTxtCtrl.py (revision 365)
+++ lib/pwiki/WikiTxtCtrl.py (working copy)
@@ -127,7 +127,7 @@
# configurable editor settings
config = self.presenter.getConfig()
- self.setWrapMode(config.getboolean("main", "wrap_mode"))
+ self.setWrapMode(config.getboolean("main", "wrap_mode"), config.getboolean("main", "wrap_word"))
self.SetIndentationGuides(config.getboolean("main", "indentation_guides"))
self.autoIndent = config.getboolean("main", "auto_indent")
self.autoBullets = config.getboolean("main", "auto_bullets")
@@ -526,9 +526,12 @@
# self.Enable(True)
self.Enable(vis)
- def setWrapMode(self, onOrOff):
+ def setWrapMode(self, onOrOff, wordOrChar):
if onOrOff:
- self.SetWrapMode(wx.stc.STC_WRAP_WORD)
+ if wordOrChar:
+ self.SetWrapMode(wx.stc.STC_WRAP_WORD)
+ else:
+ self.SetWrapMode(wx.stc.STC_WRAP_CHAR)
else:
self.SetWrapMode(wx.stc.STC_WRAP_NONE)
Index: lib/pwiki/Configuration.py
===================================================================
--- lib/pwiki/Configuration.py (revision 365)
+++ lib/pwiki/Configuration.py (working copy)
@@ -467,6 +467,7 @@
("main", "recentWikisList_length"): u"5", # Length of recent wikis list
("main", "font"): None,
("main", "wrap_mode"): "True",
+ ("main", "wrap_word"): "True",
("main", "indentation_guides"): "True",
("main", "auto_bullets"): "True", # Show bullet/number after newline if current line has bullet
("main", "auto_indent"): "True",