[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: [kate/frameworks] ktexteditor/include/ktexteditor: try to fix problem introduced by inventing se
From: Christoph Cullmann <cullmann () absint ! com>
Date: 2013-12-31 18:53:44
Message-ID: 20131231185344.8E0044C67924 () mail ! absint ! com
[Download RAW message or body]
The tests failed and the API docs told that this should be the behavior, makes more sense.
Am 31.12.2013 19:11 schrieb Dominik Haumann <dhaumann@kde.org>:
>
> On Sunday, December 29, 2013 06:35:14 PM Christoph Cullmann wrote:
> > Git commit 0583e667d75d87b68168cd19f7177557b367a159 by Christoph Cullmann.
> > Committed on 29/12/2013 at 18:24.
> > Pushed by cullmann into branch 'frameworks'.
> >
> > try to fix problem introduced by inventing setStart/End, back to old
> > semantics
>
> Where did this end up as problem? ;)
>
>
>
> > M +10 -4 ktexteditor/include/ktexteditor/range.h
> >
> > http://commits.kde.org/kate/0583e667d75d87b68168cd19f7177557b367a159
> >
> > diff --git a/ktexteditor/include/ktexteditor/range.h
> > b/ktexteditor/include/ktexteditor/range.h index f8eee76..55ddfe9 100644
> > --- a/ktexteditor/include/ktexteditor/range.h
> > +++ b/ktexteditor/include/ktexteditor/range.h
> > @@ -170,25 +170,31 @@ class KTEXTEDITOR_EXPORT Range
> > /**
> > * Set the start cursor to \e start.
> > *
> > - * \note If \e start is after current end, they will be reversed.
> > + * \note If \e start is after current end, start and end will be set to
> > new start value. *
> > * \param start new start cursor
> > */
> > void setStart (const Cursor& start)
> > {
> > - setRange (start, end());
> > + if (start > end())
> > + setRange (start, start);
> > + else
> > + setRange (start, end());
> > }
> >
> > /**
> > * Set the end cursor to \e end.
> > *
> > - * \note If \e end is in front of current start, they will be reversed.
> > + * \note If \e end is in front of current start, start and end will be
> > set to new end value. *
> > * \param end new end cursor
> > */
> > void setEnd (const Cursor& end)
> > {
> > - setRange (start(), end);
> > + if (end < start())
> > + setRange (end, end);
> > + else
> > + setRange (start(), end);
> > }
> >
> > /**
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic