in v231,
PROC_SET_EVENTS = 10
was removed and dynamic highlighting (of others occurrences of selection) doesn't work anymore.
it works again if you put the line back.
dynamic highlighting bugged
-
main Alexey
- Posts: 2907
- Joined: 25.08.2021 18:15
Re: dynamic highlighting bugged
1. proc_set_events was removed. yes. it is written in the changelog of API on the wiki. all plugins updated. call 'plugins / addons manager / update' and update all plugins.
2. if something don't work, show me errors from the Console panel (on the bottom of Cud)
2. if something don't work, show me errors from the Console panel (on the bottom of Cud)
Re: dynamic highlighting bugged
Thanks, that works too. I'm reluctant to update all plug-ins as some reset settings without notice. And this one had a deficient options dialog that didn't register user settings (no OK button) so I had to modify the opt.py file.
Actually, this seems to be the case for all plug-ins that use a dialog for config. You can set user settings but you cannot register them as there is no (visible) OK button to validate. I don't know if this has to do with plug-in "options editor" (which I updated too). There was a similar problem with dialogs years ago esp. on Windows.
Actually, this seems to be the case for all plug-ins that use a dialog for config. You can set user settings but you cannot register them as there is no (visible) OK button to validate. I don't know if this has to do with plug-in "options editor" (which I updated too). There was a similar problem with dialogs years ago esp. on Windows.
-
main Alexey
- Posts: 2907
- Joined: 25.08.2021 18:15
Re: dynamic highlighting bugged
> to update all plug-ins as some reset settings without notice.
I don't know which plugins reset settings. AFAIK, only those plugins which have big changes in they configure-system on last update. For example, when cuda_xxx.ini was replaced with cuda_xxx.json.
Settings are files in the 'settings' dir.
> this one had a deficient options dialog that didn't register user settings (no OK button)
'Highlight occur' plugin don't have OK button, but each change of options are saved w/o OK. After changes in the Options dlg, user needs to restart Cud.
>so I had to modify the opt.py file.
User don't need to modify *.py files.
Settings are files in the 'settings' dir.
I don't know which plugins reset settings. AFAIK, only those plugins which have big changes in they configure-system on last update. For example, when cuda_xxx.ini was replaced with cuda_xxx.json.
Settings are files in the 'settings' dir.
> this one had a deficient options dialog that didn't register user settings (no OK button)
'Highlight occur' plugin don't have OK button, but each change of options are saved w/o OK. After changes in the Options dlg, user needs to restart Cud.
>so I had to modify the opt.py file.
User don't need to modify *.py files.
Settings are files in the 'settings' dir.
Re: dynamic highlighting bugged
When I set some user option, it is displayed as expected but if I leave the dialog and re-enter it, it has disappeared: the changes are ignored. What is more surprising is that settings\cuda_hilite_occurrences.json (as well as the cuda_hilite_occurrences.json in the command line -s special settings dir) is actually written correctly !
It seems that settings\cuda_hilite_occurrences.json is ignored, whether changed internally or read from file.
It seems that settings\cuda_hilite_occurrences.json is ignored, whether changed internally or read from file.
-
main Alexey
- Posts: 2907
- Joined: 25.08.2021 18:15
Re: dynamic highlighting bugged
I tried to repro this bugreport.
- opened options-dlg of 'Hilite_Occur' plugin via "options / settings-plugins / highlight occur"
- there I tried to click the checkbox of the option "sel_allow" and pressed Esc
- reopened the options-dlg without app restart ==> "sel_allow" is changed like needed. So, boolean option is applied ok after options-dlg reopening.
- but integer option, e.g. "max_time" has little problem: if I change value 40 to 70 and don't press ENTER and press ESC --> next dialog reopening shows old value 40. if I change value 40 to 70 and press ENTER --> next dialog reopening shows 70.
so maybe you changed integer option and did not press ENTER?
don't forget to reinstall the Hilite_Occur if you changed .py file in it (it may be not good).
- opened options-dlg of 'Hilite_Occur' plugin via "options / settings-plugins / highlight occur"
- there I tried to click the checkbox of the option "sel_allow" and pressed Esc
- reopened the options-dlg without app restart ==> "sel_allow" is changed like needed. So, boolean option is applied ok after options-dlg reopening.
- but integer option, e.g. "max_time" has little problem: if I change value 40 to 70 and don't press ENTER and press ESC --> next dialog reopening shows old value 40. if I change value 40 to 70 and press ENTER --> next dialog reopening shows 70.
so maybe you changed integer option and did not press ENTER?
don't forget to reinstall the Hilite_Occur if you changed .py file in it (it may be not good).
Re: dynamic highlighting bugged
I did that, via via "options / settings-plugins / highlight occur:
"sel_allow": false,
"max_lines": 5000, // with ENTER pressed
"theme_item_current": "SectionBG4", // choice list
Changes are recorded as expected in cuda_hilite_occurrences.json but have no effect in the dialog or in the editor
Either without app restart or after app restart. After app restart, trace shows cuda_hilite_occurrences is actually read, after all other files.
The .py file is now the standard one, updated.
It might be specific to Windows.
"sel_allow": false,
"max_lines": 5000, // with ENTER pressed
"theme_item_current": "SectionBG4", // choice list
Changes are recorded as expected in cuda_hilite_occurrences.json but have no effect in the dialog or in the editor
Either without app restart or after app restart. After app restart, trace shows cuda_hilite_occurrences is actually read, after all other files.
The .py file is now the standard one, updated.
It might be specific to Windows.
Re: dynamic highlighting bugged
I finally solved the issue: a syntax error in cuda_hilite_occurrences.json, with a missing ","
"sel_allow_spaces": true
"theme_item_current": "LightBG2",
I suppose that *I* did it but I don't remember (if I did, that was years ago).
I didn't suspect that because the "bug" appeared inside the editor and I presumed it was not reloading the file. And it actually doesn't : it reloads its internal cached copy, which it writes.
"sel_allow_spaces": true
"theme_item_current": "LightBG2",
I suppose that *I* did it but I don't remember (if I did, that was years ago).
I didn't suspect that because the "bug" appeared inside the editor and I presumed it was not reloading the file. And it actually doesn't : it reloads its internal cached copy, which it writes.
-
main Alexey
- Posts: 2907
- Joined: 25.08.2021 18:15
Re: dynamic highlighting bugged
I tried to see which error uses sees when mentioned .json file is invalid.
I edited that file. I restarted Cud and typed N equal words.
Console panel shows the error.
so you must see the colored number on the Console's sidebar icon, eg '1' for 1 error.
I edited that file. I restarted Cud and typed N equal words.
Console panel shows the error.
Startup: 230ms, plugins: 30ms (folding_caption 31ms)
Init: cuda_hilite_occurrences
ERROR: error on loading json. Log file: C:\CudaText\settings\cudax.log
so you must see the colored number on the Console's sidebar icon, eg '1' for 1 error.
Re: dynamic highlighting bugged
I get the same.
I didn't notice the error in log, drowned in so many "Saved session: "default.cuda-session", 15 file(s), by timer at..." (every second!). I disabled the option «Show in console lines "Loaded session...", "Saved session..."». It could have separate options for read and write, and/or not repeat "save" in log if no change or before x minutes.
Thanks
I didn't notice the error in log, drowned in so many "Saved session: "default.cuda-session", 15 file(s), by timer at..." (every second!). I disabled the option «Show in console lines "Loaded session...", "Saved session..."». It could have separate options for read and write, and/or not repeat "save" in log if no change or before x minutes.
Thanks