Added a separate text width parameter for zen mode

This commit is contained in:
Veronica K. B. Olsen
2019-11-09 14:24:59 +01:00
parent 8a30f8a98e
commit fab20c6c26
3 changed files with 44 additions and 44 deletions
+5
View File
@@ -82,6 +82,7 @@ class Config:
self.textWidth = 600
self.textMargin = 40
self.tabWidth = 40
self.zenWidth = 800
self.doJustify = False
self.autoSelect = True
self.doReplace = True
@@ -279,6 +280,9 @@ class Config:
self.tabWidth = self._parseLine(
cnfParse, cnfSec, "tabwidth", self.CNF_INT, self.tabWidth
)
self.zenWidth = self._parseLine(
cnfParse, cnfSec, "zenwidth", self.CNF_INT, self.zenWidth
)
self.doJustify = self._parseLine(
cnfParse, cnfSec, "justify", self.CNF_BOOL, self.doJustify
)
@@ -394,6 +398,7 @@ class Config:
cnfParse.set(cnfSec,"width", str(self.textWidth))
cnfParse.set(cnfSec,"margin", str(self.textMargin))
cnfParse.set(cnfSec,"tabwidth", str(self.tabWidth))
cnfParse.set(cnfSec,"zenwidth", str(self.zenWidth))
cnfParse.set(cnfSec,"justify", str(self.doJustify))
cnfParse.set(cnfSec,"autoselect", str(self.autoSelect))
cnfParse.set(cnfSec,"autoreplace", str(self.doReplace))