}
-docstring DocIterator::paragraphGotoArgument() const
+docstring DocIterator::paragraphGotoArgument(bool const nopos) const
{
CursorSlice const & s = innerTextSlice();
- return convert<docstring>(s.paragraph().id()) + ' ' +
- convert<docstring>(s.pos());
+ return nopos ? convert<docstring>(s.paragraph().id())
+ : convert<docstring>(s.paragraph().id())
+ + ' ' + convert<docstring>(s.pos());
}
Paragraph & innerParagraph() const;
/// return the inner text slice.
CursorSlice const & innerTextSlice() const;
- // convert a DocIterator into an argument to LFUN_PARAGRAPH_GOTO
- docstring paragraphGotoArgument() const;
+ /// convert a DocIterator into an argument to LFUN_PARAGRAPH_GOTO
+ /// \p nopos determines whether the cursor position is returned
+ docstring paragraphGotoArgument(bool const nopos = false) const;
/// returns a DocIterator for the containing text inset
DocIterator getInnerText() const;
/// the first and last positions of a word at top cursor slice