src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py

branch
eric7
changeset 10057
1e31ca1078ab
parent 9653
e67609152c5e
child 10078
9ebe2183cf49
diff -r ac1c214e0a05 -r 1e31ca1078ab src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py
--- a/src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py	Tue May 23 13:33:47 2023 +0200
+++ b/src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py	Tue May 23 14:39:14 2023 +0200
@@ -340,8 +340,10 @@
         @rtype str
         """
         startLine = cursorPosition[0] - 1
-        endLine = startLine - min(startLine, 20)
+        endLine = startLine - min(startLine, 20) - 1
         # max. 20 lines of definition allowed
+        if endLine < -1:
+            endLine = -1
         isFirstLine = True
         functionTextList = []
 

eric ide

mercurial