--- a/QScintilla/QsciScintillaCompat.py Wed Dec 20 12:27:43 2017 +0100 +++ b/QScintilla/QsciScintillaCompat.py Fri Dec 22 16:07:49 2017 +0100 @@ -1323,6 +1323,32 @@ self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, QsciScintilla.SC_MARKNUM_FOLDEREND, backColor) + def getVisibleLineFromDocLine(self, docLine): + """ + Public method to convert a document line number to a visible line + number (i.e. respect folded lines and annotations). + + @param docLine document line number to be converted + @type int + @return visible line number + @rtype int + """ + return self.SendScintilla(QsciScintilla.SCI_VISIBLEFROMDOCLINE, + docLine) + + def getDocLineFromVisibleLine(self, displayLine): + """ + Public method to convert a visible line number to a document line + number (i.e. respect folded lines and annotations). + + @param displayLine display line number to be converted + @type int + @return document line number + @rtype int + """ + return self.SendScintilla(QsciScintilla.SCI_DOCLINEFROMVISIBLE, + displayLine) + ########################################################################### ## interface methods to the standard keyboard command set ###########################################################################