Author Topic: wxScintilla 2.01  (Read 26652 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: wxScintilla 2.01
« Reply #15 on: October 01, 2009, 07:53:18 am »
Just please wait until I commit some pending modifications to the scintilla branch to avoid conflicts.
You don't need to wait any longer. ;-) I've added the pending changes into the branch. They work fine here.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline cgarcia109

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: wxScintilla 2.01
« Reply #16 on: October 02, 2009, 02:32:30 am »
Hi, just noticed, GetSelectionNStart and GetSelectionNEnd are missing an argument
Changed another 2 lines too

edit:
I see in ScintillaWX::Paste() you added some code at the start of function but without below code the computed firstPosition is not usable

Code
Index: C:/Projects/scintilla-test-brach/src/sdk/wxscintilla/src/ScintillaWX.cpp
===================================================================
--- C:/Projects/scintilla-test-brach/src/sdk/wxscintilla/src/ScintillaWX.cpp (revision 5834)
+++ C:/Projects/scintilla-test-brach/src/sdk/wxscintilla/src/ScintillaWX.cpp (working copy)
@@ -587,10 +587,9 @@
     int newPos = 0;
     int caretMain = CurrentPosition();
     if (rectangular) {
-        SelectionPosition selStart = sel.Range(sel.Main()).Start();
         int newLine = pdoc->LineFromPosition (caretMain) + wxCountLines (buf, pdoc->eolMode);
         int newCol = pdoc->GetColumn(caretMain);
-        PasteRectangular (selStart, buf, len);
+        PasteRectangular (firstPosition, buf, len);
         newPos = pdoc->FindColumn (newLine, newCol);
     } else {
         pdoc->InsertString (caretMain, buf, len);
         
About the SCNotification initializations (memset ... ) well it could be just not initialized at all, SCNotification scn; without {0} nor memset(...
All relevant values for an specific notification are set and no other values are used by the notification receiver, it should be asumed for any non relevant values just to be unintialized.

[attachment deleted by admin]
« Last Edit: October 02, 2009, 11:53:00 am by cgarcia109 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla 2.01
« Reply #17 on: October 02, 2009, 07:00:02 am »
Just please wait until I commit some pending modifications to the scintilla branch to avoid conflicts.
You don't need to wait any longer. ;-) I've added the pending changes into the branch. They work fine here.

I will do it later today or the coming weekend.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: wxScintilla 2.01
« Reply #18 on: October 02, 2009, 12:22:05 pm »
I will do it later today or the coming weekend.
Don't hurry... I just wanted to mention that the pending modifications are added.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

mariocup

  • Guest
Re: wxScintilla 2.01
« Reply #19 on: October 06, 2009, 10:39:11 pm »
I just compiled scintilla branch and I am getting some strange behaviour (see attachment).

I have the following option enabled (not sure if relevant):
- word wrap
- virtual spaces
- multiple selection

If I select a text in block select mode (end of the line) and press Ctrl+C and then try to insert it, then not the selected text is inserted. Instead some characters of the beginning of the line are inserted.

Is this a bug or any feature that I am not using correctly.

[attachment deleted by admin]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla 2.01
« Reply #20 on: October 06, 2009, 11:06:46 pm »
Seems to work correctly here.
« Last Edit: October 07, 2009, 12:23:08 am by jens »

mariocup

  • Guest
Re: wxScintilla 2.01
« Reply #21 on: October 07, 2009, 08:13:13 am »
Hi jens,

I build with gcc 4.4.x under windows, wxwidgets 2.8.10 and the latest revesion of scinitlla branch. I will send you my default.conf to reproduce it.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla 2.01
« Reply #22 on: October 07, 2009, 09:20:34 am »
Mario:

is it possible, that you get data from a previous selection you copied to clipboard ?

If I select a rectangle and then accidently press the left mous-button inside the editor with ctrl-key pressed I get multiple selections and ctrl-c does not overwrite the clipboard with the last (in this case empty selection) nor it uses the rectangular selection, and therefore ctrl-v seems to use the last content added to clipboard.

I also can reproduce this behaviour when doing a rectangular select, and move the mouse one line up from the end of the selectionbefore I  release the mouse-button.
Or more clear select a rectangualr from (e.g.) line 2 to 6 (with ctrl-alt pressed) then move the mouse up one line (the selected rectangular is now from line 2 to 5) and the release the mouse-button.
If I now pres ctrl-c nothing seems to be copied to clipboard and the previous data is used for insertion.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla 2.01
« Reply #23 on: October 07, 2009, 10:38:29 am »
On linux I get another issue with rectangular selection and multi-selects.

If I do arectangular selection then move the mouse, pres ctrl and click anywhere, then type ctrl-c and then ctrl-v, scintilla inserts the chars of the rectangualr selections, but without the additional \n's, so it will be inserted as if all characters are in one line.
The other (windows) issue does not exist here (linux).

Offline cgarcia109

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: wxScintilla 2.01
« Reply #24 on: October 14, 2009, 04:22:27 pm »
when you do ctrl-c codeblocks first checks if a selection exists through function
cbEditor::HasSelection (as has been commented before this function is not correct with this scintilla version) this function is returning false in these cases and codeblocks never copy nothing to clipboard (nor clipboard is deleted, so old selection remains)
    
If I do arectangular selection then move the mouse, pres ctrl and click anywhere, then type ctrl-c and then ctrl-v, scintilla inserts the chars of the rectangualr selections, but without the additional \n's, so it will be inserted as if all characters are in one line.

scite (windows) does the same, maybe is normal behaviour or, if something is wrong then is wrong too in windows platform
From scintilla doc:
Quote
When discontiguous selections are copied to the clipboard, each selection is added to the clipboard text in order with no delimiting characters. For rectangular selections the document's line end is added after each line's text.
Quote
Rectangular selections are handled as multiple selections although the original rectangular range is remembered so that subsequent operations may be handled differently for rectangular selections.
But since a rectangular selection is mixed with a non rectangular selection, the selection is handled as a normal selection?

The other (windows) issue does not exist here (linux).

when you do this in linux, text is pasted rectangular? if platform is the same (wxscintilla) behaviour should be the same(??)
« Last Edit: October 14, 2009, 04:40:09 pm by cgarcia109 »

Offline asynchronous13

  • Single posting newcomer
  • *
  • Posts: 5
Re: wxScintilla 2.01
« Reply #25 on: October 15, 2009, 01:03:11 am »
I'm not positive that this is related, but it seems possible.

Ubuntu 8.10 x86_64
gcc 4.3.2

I updated to SVN 5862 (from 574X). The editor was completely unusable. It was as if "Select All" was constantly pressed. The text of the entire file in the editor was highlighted. If I clicked with the mouse, the highlighted text briefly flashed to un-highlighted, then immediately back to highlighted. If I typed anything, of course it replaced the highlighted text. So, at most I could have one character on the screen while typing.

I checked out several intermediate SVN versions to try and find where this was introduced. I did a very simple test -- if the first file opened was highlighted, it had the bug. If the file was not highlighted, I gave it a pass. Eventually I found:

5843 - ok
5844 - "select all" bug

The dates for these are 2009-10-05, which matches up with reports on this thread. I thought I could just use 5843 for now and report the bug. But then I noticed that if I selected any text whatsoever, the selected text was immediately and forever pasted into the editor. For example, if I selected a line with the mouse -- that line was pasted repeatedly into the text file until I closed codeblocks. If I selected text using shift+arrow, I could only get one letter selected (or one line) before that single letter (or line) was pasted over and over -- until I closed codeblocks. Even if I selected text in a different app -- then that text was pasted over and over into the the codeblocks editor until I closed codeblocks.

I tried rolling back several more revisions to find the source of that error, but after too many crashes I was getting inconsistent results. So, rebooted and checked out a pristine SVN tree (now 5864).

Code
svn status --no-ignore | grep '^\?' | sed 's/^\?      //'  | xargs rm -rf
make clean
make distclean
./bootstrap
./configure --with-contrib-plugins=all
make -j 8
make install

Now, when I launch CB I get the message that

Code
"One or more plugins were not loaded. 
This usually happens when a plugin is built for
a different version of the Code::Blocks SDK.
Check the application log for more info.

List of failed plugins:
libwxSmithAui.so
libwxsmith.so
libwxsmithcontribitems.so"

(by the way, where is the application log saved?) Not sure if my issue is related to the changes mentioned in this thread, or if I just forgot to update a library or something. Anyway, without those plugins at least I can use the editor again.

Offline cgarcia109

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: wxScintilla 2.01
« Reply #26 on: October 15, 2009, 03:37:57 am »
what svn are you using
-scintilla test branch
-trunk with some wxscintilla code applied
-only trunk

In the first case it could be related
In the second case, if you applied some code from this thread, that could be the trouble.
In the last case, its prolly not related as no new wxscintilla code has been applied to trunk yet. But anyway i think it will be of interest to codeblocks team.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: wxScintilla 2.01
« Reply #27 on: October 15, 2009, 02:52:54 pm »
I'm not positive that this is related, but it seems possible.

Ubuntu 8.10 x86_64
gcc 4.3.2

I updated to SVN 5862 (from 574X). The editor was completely unusable. It was as if "Select All" was constantly pressed. The text of the entire file in the editor was highlighted. If I clicked with the mouse, the highlighted text briefly flashed to un-highlighted, then immediately back to highlighted. If I typed anything, of course it replaced the highlighted text. So, at most I could have one character on the screen while typing.

You have to rebuild (clean and build) the whole sources (see here).
« Last Edit: October 15, 2009, 02:54:34 pm by jens »

Offline asynchronous13

  • Single posting newcomer
  • *
  • Posts: 5
Re: wxScintilla 2.01
« Reply #28 on: October 15, 2009, 05:16:51 pm »
what svn are you using
-scintilla test branch
-trunk with some wxscintilla code applied
-only trunk

trunk only. so perhaps it had nothing to do with wxScintilla changes.
This thread matches my symptoms more closely.

You have to rebuild (clean and build) the whole sources (see here).

Done, as mentioned in the 2nd half of my post. The "select all" issue appears to better now, but any thoughts on why certain plugins no longer load?