338 @type tuple of (int, int) |
338 @type tuple of (int, int) |
339 @return text containing the function definition |
339 @return text containing the function definition |
340 @rtype str |
340 @rtype str |
341 """ |
341 """ |
342 startLine = cursorPosition[0] - 1 |
342 startLine = cursorPosition[0] - 1 |
343 endLine = startLine - min(startLine, 20) |
343 endLine = startLine - min(startLine, 20) - 1 |
344 # max. 20 lines of definition allowed |
344 # max. 20 lines of definition allowed |
|
345 if endLine < -1: |
|
346 endLine = -1 |
345 isFirstLine = True |
347 isFirstLine = True |
346 functionTextList = [] |
348 functionTextList = [] |
347 |
349 |
348 for lineNo in range(startLine, endLine, -1): |
350 for lineNo in range(startLine, endLine, -1): |
349 text = self.editor.text(lineNo).rstrip() |
351 text = self.editor.text(lineNo).rstrip() |