src/eric7/QScintilla/Editor.py

branch
eric7
changeset 10341
3fdffd9cc21d
parent 10331
c1a2ff7e3575
child 10343
d7d52b0b4448
equal deleted inserted replaced
10340:548b4c7f410e 10341:3fdffd9cc21d
6708 @type bool 6708 @type bool
6709 """ 6709 """
6710 if line == 0: 6710 if line == 0:
6711 line = 1 6711 line = 1
6712 # hack to show a syntax error marker, if line is reported to be 0 6712 # hack to show a syntax error marker, if line is reported to be 0
6713
6714 line = min(line, self.lines())
6715 # Limit the line number to the ones we really have to ensure proper display
6716 # of the error annotation.
6717
6713 if setError: 6718 if setError:
6714 # set a new syntax error marker 6719 # set a new syntax error marker
6715 markers = self.markersAtLine(line - 1) 6720 markers = self.markersAtLine(line - 1)
6716 index += self.indentation(line - 1) 6721 index += self.indentation(line - 1)
6717 if not (markers & (1 << self.syntaxerror)): 6722 if not (markers & (1 << self.syntaxerror)):
6862 @type int 6867 @type int
6863 """ 6868 """
6864 if line == 0: 6869 if line == 0:
6865 line = 1 6870 line = 1
6866 # hack to show a warning marker, if line is reported to be 0 6871 # hack to show a warning marker, if line is reported to be 0
6872
6873 line = min(line, self.lines())
6874 # Limit the line number to the ones we really have to ensure proper display
6875 # of the warning annotation.
6876
6867 if setWarning: 6877 if setWarning:
6868 # set/amend a new warning marker 6878 # set/amend a new warning marker
6869 warn = (msg, warningType) 6879 warn = (msg, warningType)
6870 markers = self.markersAtLine(line - 1) 6880 markers = self.markersAtLine(line - 1)
6871 if not (markers & (1 << self.warning)): 6881 if not (markers & (1 << self.warning)):

eric ide

mercurial