[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Using textInserted and textRemoved
From:       Milian Wolff <mail () milianw ! de>
Date:       2009-11-30 21:16:53
Message-ID: 200911302216.55771.mail () milianw ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 30 November 2009 21:44:23 Gregory Haynes wrote:
> Bump
> 
> Can someone confirm if this acts as I specified?

Hey,

sadly I don't have much time right now. Could you maybe come up with a simple 
test-case that I could just install to see for myself?

Actually unit-tests for Kate would generally be a good idea, though afaik 
there only a few so far. But, nevertheless, take a look at:

http://dhaumann.blogspot.com/2009/06/kate-test-regression-suite.html

> On November 28, 2009 12:35:53 you wrote:
> > On Nov 28, 2009, at 10:41 AM, Dominik Haumann wrote:
> > > On Friday 27 November 2009, Gregory Haynes wrote:
> > >> I have an application that needs to monitor text insertions and
> 
> removals
> 
> > >> on a KTextEditor::Document so that it can keep a second document in
> 
> the
> 
> > >> same state.  textInserted and textRemoved works fine for this until
> > >> someone deletes a newline by putting cursor at line n, column 0 and
> > >> presses backspace.  This causes the textRemoved signal to emit that
> 
> the
> 
> > >> entire line n was removed, not just the newline.  Is there a way I can
> > >> obtain the information I am looking for, which in this case would be
> > >> just a textRemoved event with '\n' as the text?
> > >
> > > As I understand you have:
> > >
> > > text....
> > > more text
> >
> > Correct
> >
> > > Now you are before more and press backspace, so you get
> > > text...more text
> > >
> > > In that case lineRemoved + textInserted should be called, correct?
> >
> > I expected Document::textRemoved to emit only the range where the
> 
> newline
> 
> >  character was, not newline + more text since the 'more text' is not
> >  actually removed.
> >
> > > Dominik
-- 
Milian Wolff
mail@milianw.de
http://milianw.de

["signature.asc" (application/pgp-signature)]

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic