![]() |
Forum Index : Microcontroller and PC projects : MMedit bug in Search
Author | Message | ||||
MikeO Senior Member ![]() Joined: 11/09/2011 Location: AustraliaPosts: 275 |
Well more like an annoyance , you can stop it when you are aware. For ages now when searching I would press find scanning through the program for the line I wanted without realising until the program stopped with an error that I Had introduce the error when searching. It depends what you are searching for but here is the classic TRAP I have on occasions caused for myself. See in the snippet below I was searching for "off" , I had pressed find and search had found off in the variable off% but had put some "spaces" in the text. How you ask? well I have a habit of typing the text in the search window and sometimes without a further thought I press "Enter" , if you do that and do a search when it finds the text after pressing "Find" it will introduce those spaces all on its own. If it wasn't the line you were looking for you can go blindly on and not realise until it crashes with an error as in the case below with spaces in the variable. Simple answer , Yes i know don't press enter when I didn't need to but like my wife says about problems she finds in the data base application I wrote, why didn't you stop it doing that? even when I say , that's operator error! Sorry Jim! I can live with it but others may not have realised where that program error came from and that they caused it. Cheers Mike, Great Great Great program by the way! I cannot manage without it.. ![]() Codenquilts |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
There a few strange things with the Find command. Originally, I kept the focus on the "Find" window which made repeat finds etc easy to control. Some users wanted to edit at the 'found' location and then continue with the 'finding' after editing. This means focus has to return to the main window (with the 'find' target highlighted) When you pres enter or any other key, the edit window does as instructed and replaces the highlighted text with whatever you typed. Your problem is a bit different. I am not sure why it puts in spaces when you do as you are doing. I did a few tests and I cannot see the extra spaces anywhere in my side of the code. I will blame the Scintilla gadget that does the actual editing. Jim VK7JH MMedit |
||||
MikeO Senior Member ![]() Joined: 11/09/2011 Location: AustraliaPosts: 275 |
I thought the Find again didn't exhibit the problem BUT I have found it does. I will just keep my finger away from the Enter Key I think. Thanks Mike. Codenquilts |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Jim - Fantastic software! Something I use "every day" and "couldn't be without"! Mike is right that it is an annoyance that one needs to adapt to. It took me a while to realise what was causing weird spaces to occur in my code - my own silly fault for too quickly hitting <Enter> instead of clicking on "Find". I typically have two sessions of MMEdit running (base station and remote s/w), plus two sessions of chat, plus a session of Notepad++. If I get on a roll it is SO easy to lose track of what I am editing. Hitting <Enter> at the wrong time causes no end of fun. Keep up the good work. Andrew |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
I couldn't work out why the extra spaces were being inserted so I decided to intercept the CR that was causing the problem. Now you can type in a search phrase and hit return which will act the same as pressing the find button. The cursor doesn't have to be at the end of the search phrase so if there is an existing phrase in the box when you open the search dialog, enter will work. Note that if you press return again while you are in the editor, you will not be happy. I haven't done anything with the 'replace' box. That is too dangerous to try anything clever. I haven't done much testing so use at your own risk and please report your opinions. 2018-01-24_140155_MMedit.zip Extract the TKN file and place it in the program folder. Jim VK7JH MMedit |
||||
MikeO Senior Member ![]() Joined: 11/09/2011 Location: AustraliaPosts: 275 |
Thanks Jim, I will try and report back. Mike Codenquilts |
||||
MikeO Senior Member ![]() Joined: 11/09/2011 Location: AustraliaPosts: 275 |
Terrific Jim that nailed it! ![]() Thanks again. Codenquilts |
||||
Andrew_G Guru ![]() Joined: 18/10/2016 Location: AustraliaPosts: 871 |
Hi Jim - fantastic (as usual)! Thanks, Andrew |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |