Author Topic: Deletion of a folded line bug (Scintilla)  (Read 4750 times)

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Deletion of a folded line bug (Scintilla)
« on: December 19, 2006, 03:10:46 pm »
Okay so I have been playing around with the bug/cosmetic bug that when you delete a folded line of lets say:
Code
233
234   void proc()
235   {_________________________________________
267   

If you only select lines number 234 and 235, the visible lines will be 233 and 267, all of the rest will stay hidden.
The first possible solution for this will be to go to wxscintilla.cpp at line 1830, and add a line or two that checks for hidden lines.

Another problem is when you are at line 267, and you backspace. You end up deleting hidden lines... without seeing what you are doing... This can also be approached in line 1830 of wxscintilla.cpp

Okay so here is the question. Do change Scintilla (wxScintilla) or don't we? Is there another position in C::B where I can start to look?

Dawie

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Deletion of a folded line bug (Scintilla)
« Reply #1 on: December 19, 2006, 03:18:55 pm »
Quote
Okay so here is the question. Do change Scintilla (wxScintilla) or don't we? Is there another position in C::B where I can start to look?

You can patch wxScintilla as needed (and then we can forward these patches upstream). For scintilla though, it 'd be better to contact the scintilla team...
Be patient!
This bug will be fixed soon...

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: Deletion of a folded line bug (Scintilla)
« Reply #2 on: December 20, 2006, 08:56:02 am »
Fixed wxScintilla.cpp so that backspace will first unfold the current block before deleting anything... have a weird issue with delete though... working on that  :(

Anyway, how do I hook keypress events within the cbeditor class? I have a very uncomfortable feeling as I am changing wxScintilla.cpp... I saw in cbeditor.cpp a wxEVT_SCI_KEY event hook, but not sure what it is used for... when I implemented it (by reading the comments above the declaration) it does not execute my named function on a key press within cbEditor class functions...

Any suggestions?

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: Deletion of a folded line bug (Scintilla)
« Reply #3 on: December 21, 2006, 08:25:34 am »
wxWidgets I tried the MACRO way of defining the EVT_KEY_DOWN and it didn't work... (It never enters the procedure)

I also tried the other way mentioned within the comments using wx_SCI_KEY... that did not work either... (Doesn't even enters the procedure) So somewhere it is processed and not allowed to be processed further... event.Skip(); That is what I think... Do I need to enabled the Key Events specifically somewhere else?

Killerbot? Any dev?