View unanswered posts | View active topics



Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
some auto-indenting goodness 
Author Message
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3046
Location: Finland
Reply with quote
I did a small fix so that the cursor don't go to next line when moving after the selection. Also i needed to change the shortcuts as the Alt key invoked the menu accelerator char access.

John: Could you take a look at the bug i found where you can't move a line the top most line? You can move a line to the last line.


Sun Jan 23, 2011 9:42 pm
Profile WWW
Member

Joined: Wed Sep 08, 2010 3:51 pm
Posts: 63
Reply with quote
Mika,
Your fix broke the movement for multiple lines. I'm not sure what problem you were trying to fix, (the behavior was the same as it was in the FDjpPlugin), but I think this is what you want:
Code:
            this.SelectionEnd = this.LineEndPosition(startLine + len - 1);

The bug at the top line is a bit unusual, in that LineFromPosition() is actually returning '0' on the top line, when I expected it to match the displayed line number of '1'. I guess they're adding +1 to an internal zero-based index.

In any case, the behavior can be fixed by changing line #6046 to: (note both comparisons changed)
Code:
            if (startLine < 0 || startLine >= this.LineCount) startLine -= dir;


Mon Jan 24, 2011 12:25 am
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3046
Location: Finland
Reply with quote
Thanks, applied to SVN.


Mon Jan 24, 2011 8:35 am
Profile WWW
Member

Joined: Wed Sep 08, 2010 3:51 pm
Posts: 63
Reply with quote
I'm experiencing a bug in SmartPaste() that might be related to a setting, since I'm running this on a new machine, or other code that has changed, or it might be that I didn't notice the problem earlier.

Basically, if I copy full lines, then select text at the destination with the intention of replacing the selected text with a paste, issuing a SmartPaste() doesn't remove the selected text before pasting.

What I believe is happening here, is that the sci.Home() I'm doing before the sciPaste() results in the selection being deselected. (That's the part that might be setting, or other code related).

I fixed it using the code below. Feel free to use the recently-fixed "SelTextSize", which I hadn't updated to yet.


Code:
Index: MainForm.cs
===================================================================
--- MainForm.cs   (revision 1831)
+++ MainForm.cs   (working copy)
@@ -1889,6 +1889,7 @@
                 else
                 {
                     sci.BeginUndoAction();
+                    if (sci.SelectionStart != sci.SelectionEnd) sci.Clear();
                     sci.Home();
                     int pos = sci.CurrentPos;
                     int lines = sci.LineCount;


Tue May 17, 2011 2:42 pm
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3046
Location: Finland
Reply with quote
Confirmed. Thanks, added to the SVN.


Wed May 18, 2011 7:33 am
Profile WWW
Member

Joined: Fri Dec 21, 2012 10:32 am
Posts: 20
Reply with quote
Are you kidding me ? Is this what you have been wasted your time on ? There are a lot of bugs in that IDE still on the date I post this post (important stuff, not playing with selections). This line moving and auto-indenting has never and will never interest me. (I'm not bitching, this is feedback.)


Wed Dec 18, 2013 12:53 pm
Profile
Member

Joined: Thu Feb 09, 2006 10:58 am
Posts: 1095
Location: Israel
Reply with quote
Random, you're more then welcome to fix them yourself. It's the power of Open Source ;)

_________________
MovieClipCommander


Wed Dec 18, 2013 1:54 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Haha, keep cool @random - someone took some time to provide a small patch and Mika merged it, that's hardly time wasted :)

Things have been a bit slow lately, especially for me as I moved and changed job, but we are committed to fixing the bugs.


Wed Dec 18, 2013 2:14 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 23 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.