News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

cbEVT_EDITOR_NEW_LINE event ?

Started by mmkider, January 04, 2009, 03:51:54 PM

Previous topic - Next topic

mmkider

Hi codeblocks team,
Breakpoint and bookmark need cbEVT_EDITOR_NEW_LINE event for change location.
But I can't find cbEVT_EDITOR_NEW_LINE event.
Any solutions?

Thank you for your reply.



MortenMacFly

Quote from: mmkider on January 04, 2009, 03:51:54 PM
Any solutions?
You may want to provide a patch accordingly - have a look how the other cbEVT_EDITOR_XXX events are implemented.

But are you aware that this event would be thrown ~ a million times and would certainly cost performance?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

thomas

I would not worry about performance in this case, since an event is sent for every editor update already, which is whenever you hit a key or move the mouse.
It kind of makes a separate "new line" event obsolete, however. The editor implements the "smart indent" feature (which basically needs a "new line event") using the editor update event too.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

dje

Hi !

Don't forget to manage copy/paste events that can introduce new lines!
I don't know if new lines events are triggered only when a carriage return keypress is detected...

Dje

mmkider

Now I have only thought of the three applications(Bookmarks、Breakpoint、Navigate Forward and Navigate Backward)

However, I think that the SDK of codeblocks more clearly in the delivery of cbEVT_EDITOR_NEW_LINE(S?).

I feel that many problems to be considered for the implementation of the cbEVT_EDITOR_NEW_LINE(S?).

Thank you for your response.