donnyh13 Posted September 22, 2023 Share Posted September 22, 2023 Okay, sounds good Jos! Will try it out. In case you have another batch of free time to play with, I have autocomplete.au3.min.length=2 set in my SciTEUser.properties but typing a simple "_" (or any letter actually) is causing an autocomplete drop down still. Is this correct? LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
donnyh13 Posted September 22, 2023 Share Posted September 22, 2023 (edited) Did a quick test, typing and autocomplete seems back to normal! Thanks for the fix Jos! Edited September 22, 2023 by donnyh13 LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
donnyh13 Posted September 22, 2023 Share Posted September 22, 2023 Quote In case you have another batch of free time to play with, I have autocomplete.au3.min.length=2 set in my SciTEUser.properties but typing a simple "_" (or any letter actually) is causing an autocomplete drop down still. Is this correct? I just tested with Scite 4.4.6, and any letter being typed causing a dropdown seems correct, but typing a "_" never used to cause the drop down to appear. I'm thinking it's normal now however with the further list of AutoCompletes (out of UDFs etc), so never mind. LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
Developers Jos Posted September 23, 2023 Author Developers Share Posted September 23, 2023 I did indeed break the autocomplete.au3.min.length along the way making changes, so will have a look at that. It might be I have to revert the fix implemented for backspace and multiple insertion points as that depends on the internals of SciTE which I likely can't influence in a LUA script. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 23, 2023 Author Developers Share Posted September 23, 2023 Just uploaded some lua updates to SciTE_changes_Dynamic_Includes_LUA.zip: autocomplete.au3.min.length should properly work again dropdown generated again when backspace is pressed. backspace also working on multi select, but only the active cursor pos will get the autocomplete result. the re-lex is now move into a function and will only do more lines when multiselect is active, else it will only do the current line as in the past. mLipok and donnyh13 1 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 Thanks Jos, that fixed the AutoComplete. But brought the inability to backspace a selected #Include error again. Is that what you were meaning, that to fix the AutoComplete min length, that problem is inevitable? LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2023 Author Developers Share Posted September 24, 2023 (edited) 34 minutes ago, donnyh13 said: But brought the inability to backspace a selected #Include error again. Is that what you were meaning, Nah .... sigh.... I didn't intent to break that again. 😵 This was: Select the whole line and use backspace to remove it which now only does one character ..... ( before nothing) ...right? EDIT: This is now actually a general issue: When a ranges is selected and the back-space is hit, only one character is removed. Edited September 24, 2023 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 6 minutes ago, Jos said: EDIT: This is now actually a general issue: When a ranges is selected and the back-space is hit, only one character is removed. I actually just came here to report that. LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 (edited) I'm guessing this would be at fault? On 9/23/2023 at 6:23 AM, Jos said: dropdown generated again when backspace is pressed. Edited September 24, 2023 by donnyh13 LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2023 Author Developers Share Posted September 24, 2023 (edited) Try replacing these lines in AutoItAutoComplete.lua: 70 for i = 1, editor.Selections, 1 do editor:RotateSelection() editor:DeleteRange(editor.CurrentPos - 1, 1) end for 70 for i = 1, editor.Selections, 1 do editor:RotateSelection() if editor.SelectionEnd - editor.SelectionStart == 0 then editor:DeleteRange(editor.CurrentPos - 1, 1) else --print(editor.SelectionStart, editor.SelectionEnd-editor.SelectionStart) editor:DeleteRange(editor.SelectionStart, editor.SelectionEnd-editor.SelectionStart) end end and see if that fixes it. 8 minutes ago, donnyh13 said: I'm guessing this would be at fault? Nah... no worries... I just want that back-space behave as it should while still having the dynamic dropdown autocomplete popup. Edited September 24, 2023 by Jos donnyh13 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 5 minutes ago, Jos said: see if that fixes it. That fixed it! Thanks Jos, I see that breaks backspacing with multiple selections though? LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2023 Author Developers Share Posted September 24, 2023 (edited) 9 minutes ago, donnyh13 said: see that breaks backspacing with multiple selections though? Are you sure? Just tried doing the multi-selection and backspace on a single character and range and they both worked for me. This is what I have now: 70 for i = 1, editor.Selections, 1 do editor:RotateSelection() --print(editor.CurrentPos, editor.SelectionStart, editor.SelectionEnd - editor.SelectionStart) -- Check if Selection-range is active in which case we delete the whole selection, else just one character if editor.SelectionEnd - editor.SelectionStart == 0 then editor:DeleteRange(editor.CurrentPos - 1, 1) else editor:DeleteRange(editor.SelectionStart, editor.SelectionEnd - editor.SelectionStart) end end Edited September 24, 2023 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 (edited) Ya, I just tried several times, it is in fact deleting 3 characters per backspace press, only on the last created selection..... my AutoitAutoComplete.Lua looks like this. 69 -- remove the character and start DropDown process for i = 1, editor.Selections, 1 do if editor.SelectionEnd - editor.SelectionStart == 0 then editor:DeleteRange(editor.CurrentPos - 1, 1) else print(editor.SelectionStart, editor.SelectionEnd-editor.SelectionStart) editor:DeleteRange(editor.SelectionStart, editor.SelectionEnd-editor.SelectionStart) end end 78 local curword = self:GetWord(0,true) correct? Edit. Deleting multiple selections in a range works however Edited September 24, 2023 by donnyh13 LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2023 Author Developers Share Posted September 24, 2023 You are missing this line: editor:RotateSelection() donnyh13 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 2 minutes ago, Jos said: You are missing this line: editor:RotateSelection() Sorry, must have somehow deleted it?? I copied and pasted your code even. LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 Okay, works great! My apologies for the false alarm. Should have double checked. Noticed while backspacing comments AutoComplete drops down. LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2023 Author Developers Share Posted September 24, 2023 no worries, could have been me making some edits in the initial post..... important bit is that it works. That statement basically loops through the multiple selects and does its thing. Also tried to use that logic for the insertion, but haven't found a way yet to insert the text and not lose the multiple selects. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2023 Author Developers Share Posted September 24, 2023 2 minutes ago, donnyh13 said: Noticed while backspacing comments AutoComplete drops down. Will have a look at that too... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 3 minutes ago, Jos said: Also tried to use that logic for the insertion, but haven't found a way yet to insert the text and not lose the multiple selects. Little rough, but could you insert the text, lose the selections, and then add them back? (editor:AddSelection) 3 minutes ago, Jos said: Will have a look at that too. Sounds good, not a huge problem anyway. LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
donnyh13 Posted September 24, 2023 Share Posted September 24, 2023 Noticed it is taking two backspace presses to "delete" an empty line. LibreOffice UDF ; Scite4AutoIt Spell-Checker Using LibreOffice Spoiler "Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now