5718 |
5718 |
5719 if newWin: |
5719 if newWin: |
5720 self._modificationStatusChanged(editor.isModified(), editor) |
5720 self._modificationStatusChanged(editor.isModified(), editor) |
5721 self._checkActions(editor) |
5721 self._checkActions(editor) |
5722 |
5722 |
5723 cline, cindex = editor.getCursorPosition() |
5723 cline, _cindex = editor.getCursorPosition() |
5724 cline += 1 |
5724 cline += 1 |
5725 if isinstance(lineno, list): |
5725 if isinstance(lineno, list): |
5726 if len(lineno) > 1: |
5726 if len(lineno) > 1: |
5727 for line in lineno: |
5727 for line in lineno: |
5728 if line > cline: |
5728 if line > cline: |
5890 """ |
5890 """ |
5891 if not fn.startswith("<"): |
5891 if not fn.startswith("<"): |
5892 self.openSourceFile(fn, line) |
5892 self.openSourceFile(fn, line) |
5893 self.setFileLine(fn, line) |
5893 self.setFileLine(fn, line) |
5894 |
5894 |
5895 def setFileLine(self, fn, line, error=False, syntaxError=False): |
5895 def setFileLine(self, fn, line, error=False): |
5896 """ |
5896 """ |
5897 Public method to update the user interface when the current program |
5897 Public method to update the user interface when the current program |
5898 or line changes. |
5898 or line changes. |
5899 |
5899 |
5900 @param fn filename of editor to update |
5900 @param fn filename of editor to update |
5901 @type str |
5901 @type str |
5902 @param line line number to highlight |
5902 @param line line number to highlight |
5903 @type int |
5903 @type int |
5904 @param error flag indicating an error highlight |
5904 @param error flag indicating an error highlight |
5905 @type bool |
5905 @type bool |
5906 @param syntaxError flag indicating a syntax error |
|
5907 @type bool |
|
5908 """ |
5906 """ |
5909 try: |
5907 try: |
5910 newWin, self.currentEditor = self.getEditor(fn) |
5908 newWin, self.currentEditor = self.getEditor(fn) |
5911 except (OSError, UnicodeDecodeError): |
5909 except (OSError, UnicodeDecodeError): |
5912 return |
5910 return |
5916 eol = self.currentEditor.getEolIndicator() |
5914 eol = self.currentEditor.getEolIndicator() |
5917 zoom = self.currentEditor.getZoom() |
5915 zoom = self.currentEditor.getZoom() |
5918 self.__setSbFile(fn, line, encoding=enc, language=lang, eol=eol, zoom=zoom) |
5916 self.__setSbFile(fn, line, encoding=enc, language=lang, eol=eol, zoom=zoom) |
5919 |
5917 |
5920 # Change the highlighted line. |
5918 # Change the highlighted line. |
5921 self.currentEditor.highlight(line, error, syntaxError) |
5919 self.currentEditor.highlight(line=line, error=error) |
5922 |
5920 |
5923 self.currentEditor.highlightVisible() |
5921 self.currentEditor.highlightVisible() |
5924 self._checkActions(self.currentEditor, False) |
5922 self._checkActions(self.currentEditor, False) |
5925 |
5923 |
5926 if newWin: |
5924 if newWin: |