E5XML/SessionHandler.py

changeset 228
1cce8982e636
parent 55
b5c84934de9c
child 229
fa7024a3cd58
equal deleted inserted replaced
227:923897a18b6a 228:1cce8982e636
110 @param attrs list of tag attributes 110 @param attrs list of tag attributes
111 """ 111 """
112 self.buffer = "" 112 self.buffer = ""
113 self.cline = int(attrs.get("cline", "0")) 113 self.cline = int(attrs.get("cline", "0"))
114 self.cindex = int(attrs.get("cindex", "0")) 114 self.cindex = int(attrs.get("cindex", "0"))
115 self.zoom = int(attrs.get("zoom", "-1"))
115 116
116 folds = attrs.get("folds", "") 117 folds = attrs.get("folds", "")
117 if folds: 118 if folds:
118 self.folds = [int(f) for f in folds.split(',')] 119 self.folds = [int(f) for f in folds.split(',')]
119 else: 120 else:
124 Handler method for the "Filename" end tag. 125 Handler method for the "Filename" end tag.
125 """ 126 """
126 self.vm.openFiles(self.buffer) 127 self.vm.openFiles(self.buffer)
127 ed = self.vm.getOpenEditor(self.buffer) 128 ed = self.vm.getOpenEditor(self.buffer)
128 if ed is not None: 129 if ed is not None:
130 if self.zoom > -1:
131 ed.zoomTo(self.zoom)
129 if self.folds: 132 if self.folds:
130 ed.recolor() 133 ed.recolor()
131 for line in self.folds: 134 for line in self.folds:
132 ed.foldLine(line - 1) 135 ed.foldLine(line - 1)
133 ed.setCursorPosition(self.cline, self.cindex) 136 ed.setCursorPosition(self.cline, self.cindex)

eric ide

mercurial