[kdevplatform/1.7] language/editor: Support renaming declarations when cursor at the end of the declaration.

Milian Wolff mail at milianw.de
Sat Jul 5 18:28:47 UTC 2014


Hello Sergey,

the "fix" below is wrong. It changes the behavior for rangeinrevision in a way 
that is incompatible to the other range classes, most notably 
KTextEditor::Range.

Please revert it. Instead, if requiered, add a check for the equal cursor to 
wherever it is required in the declaration renaming that affects the bug.

Furthermore, please do not commit stuff like this directly. Please first push 
the commit to reviewboard so we can comment on that.

Thanks

On Saturday 05 July 2014 13:25:07 Sergey Kalinichev wrote:
> Git commit 0dbf67a0cfafb6c053cdae72166acf4422d31f85 by Sergey Kalinichev.
> Committed on 05/07/2014 at 12:53.
> Pushed by skalinichev into branch '1.7'.
> 
> Support renaming declarations when cursor at the end of the declaration.
> 
> The cause of that was misspelled <= operator.
> 
> BUG: 333697
> 
> M  +1    -1    language/editor/rangeinrevision.h
> 
> http://commits.kde.org/kdevplatform/0dbf67a0cfafb6c053cdae72166acf4422d31f85
> 
> diff --git a/language/editor/rangeinrevision.h
> b/language/editor/rangeinrevision.h index 8fe63ef..e636c21 100644
> --- a/language/editor/rangeinrevision.h
> +++ b/language/editor/rangeinrevision.h
> @@ -63,7 +63,7 @@ public:
>      }
> 
>      bool contains(const CursorInRevision& position) const {
> -        return position >= start && position < end;
> +        return position >= start && position <= end;
>      }
> 
>      bool contains(const RangeInRevision& range) const {

-- 
Milian Wolff
mail at milianw.de
http://milianw.de


More information about the KDevelop-devel mailing list