Skip to content

Commit

Permalink
bugfix in add source line
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Faist committed Dec 16, 2015
1 parent 051a7fc commit 1763ea9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/bibolamazi_gui/openbibfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,8 @@ def _insert_new_cmd(self, cmdtext):
if (cmd is None):
insertcur = QTextCursor(doc.findBlockByNumber(self.ui.txtConfig.textCursor().block().blockNumber()))
else:
# insert _after_ current cmd (-> +1 for next line, no correction for offset starting at 1...)
insertcur = QTextCursor(doc.findBlockByNumber(self.bibolamaziFile.configLineNo(cmd.linenoend+1)))
# insert _after_ current cmd (-> +1 for next line, -1 to correct for offset starting at 1)
insertcur = QTextCursor(doc.findBlockByNumber(self.bibolamaziFile.configLineNo(cmd.linenoend)))

insertcur.insertText(str(cmdtext)+'\n')
# select inserted text without the newline
Expand Down

0 comments on commit 1763ea9

Please sign in to comment.