Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/Toolset/home.livecodescript b/Toolset/home.livecodescript
index 9a88644..ae25f30 100644
--- a/Toolset/home.livecodescript
+++ b/Toolset/home.livecodescript
@@ -1165,42 +1165,8 @@ command revInternal__InitialiseLibraries
try
insert script of stack "revInitialisationLibrary" into back
catch tError
-<<<<<<< HEAD
revInternal__Log "Error", "Error loading initialisation library" & return & tError
end try
-=======
- answer "Error loading main IDE" & return & tError
- end try
-
- revInternal__LoadLibrary "revBackScriptLibrary"
-
- revInternal__LoadLibrary "revSBLibrary"
- # MW-2011-04-11: New deploy library for Android/iOS simulate/test support
- revInternal__LoadLibrary "revDeployLibrary"
-
- # OK-2008-03-11 : New debugger and metadata library
- revInternal__LoadLibrary "revDebuggerLibrary"
- revInternal__LoadLibrary "revMetadataLibrary"
-
- # OK-2008-11-25 : revOnline library
- insert the script of stack "revOnlineLibrary" into back
-
- revInternal__LoadLibrary "revOldIdeLibrary"
- revInternal__LoadLibrary "revLibUrl"
- revInternal__LoadLibrary "revCommonLibrary"
- revInternal__LoadLibrary "revPrintLibrary"
- revInternal__LoadLibrary "revAnimationLibrary"
- revInternal__LoadLibrary "revGeometryLibrary"
- revInternal__LoadLibrary "revXMLRPCLibrary"
- revInternal__LoadLibrary "revProfilesLibrary"
- revInternal__LoadLibrary "revDatabaseLibrary"
- revInternal__LoadLibrary "revTableLibrary"
-
- if the editionType is not "community" then
- revInternal__LoadLibrary "autocomplete-pro"
- revInternal__LoadLibrary "autocomplete"
- end if
->>>>>>> develop-8.2
revInternal_SetJAVA_HOME
diff --git a/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript b/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript
index e84782f..0e78ffd 100644
--- a/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript
+++ b/Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript
@@ -831,6 +831,9 @@ command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup
put pObject into tObject
end if
+ local tUUID
+ put the linkText of char pOffset of field "Script" of me into tUUID
+
local tBracketCompletionType
__BracketCompletion pOffset, pOldText, pNewText
put it into tBracketCompletionType
@@ -850,13 +853,13 @@ command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup
add 1 to sTextGroupLengths[tObject,sTextGroupIndex[tObject]]
local tEditPlaceholder
- put sEditChunks is an array and sEditPlaceholder is not empty and \
+ put sEditChunks is an array and tUUID is not empty and \
pOffset >= sEditChunks[1]["start"] and \
pOffset + length(pOldText) - 1 <= sEditChunks[1]["end"] and \
return is not in pNewText into tEditPlaceholder
if tEditPlaceholder and \
- sPlaceholders[sEditPlaceholder]["classes"][1] is "identifier" then
+ sPlaceholders[tUUID]["classes"][1] is "identifier" then
put comma is not in pNewText and \
";" is not in pNewText and \
space is not in pNewText and \
@@ -902,7 +905,7 @@ command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup
add tNewLength - tSelectedLength to tToAdd
add tNewLength - tSelectedLength to sEditChunks[tIndex]["end"]
- set the linkText of char sEditChunks[tIndex]["start"] to sEditChunks[tIndex]["end"] of field "script" of me to sEditPlaceholder
+ set the linkText of char sEditChunks[tIndex]["start"] to sEditChunks[tIndex]["end"] of field "script" of me to tUUID
if tIndex is 1 then
set the backgroundColor of char sEditChunks[tIndex]["start"] to sEditChunks[tIndex]["end"] of field "script" of me to empty
else
@@ -916,8 +919,8 @@ command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup
add 1 to sTextOperationIndex[tObject]
add 1 to sTextGroupLengths[tObject,sTextGroupIndex[tObject]]
end repeat
- put true into sPlaceholders[sEditPlaceholder]["edited"]
- set the linkText of char pOffset to pOffset + max(1,tNewLength - 1) of field "script" of me to sEditPlaceholder
+ put true into sPlaceholders[tUUID]["edited"]
+ set the linkText of char pOffset to pOffset + max(1,tNewLength - 1) of field "script" of me to tUUID
if tSelection is not empty then
select tSelection
@@ -943,7 +946,7 @@ command textReplace pOffset, pOldText, pNewText, pObject, pDontGroup
-- when formatting or pasting we don't want autocomplete to pop up
if the number of lines of pNewText <= 1 then
- __UpdateAutoCompleteList sEditPlaceholder
+ __UpdateAutoCompleteList tUUID
end if
else
local tCache
@@ -2176,39 +2179,39 @@ on tabKey
local tProviderCompletion
put __GetPreference("editor,providercompletion", true) into tProviderCompletion
- local tDoTab = true
+ local tDoFormat = true
if tProviderCompletion and \
there is a stack "com.livecode.script-library.autocomplete" then
ideAutocompleteHandleTab the long id of me, sObjectId, sPlaceholders, sEditPlaceholder, sEditChunks
- put the result into tDoTab
+ put the result into tDoFormat
end if
- if tDoTab then
- if tAutoFormat then
+ if tAutoFormat then
+ if tDoFormat then
if the shiftKey is "down" then
scriptFormat "script"
else
scriptFormat "handler"
end if
+ end if
+ else
+ get the selectedChunk
+
+ local tFrom, tTo
+ put word 2 of it into tFrom
+ put word 4 of it into tTo
+
+ local tAt, tLength
+ if tFrom > tTo then
+ put tFrom into tAt
+ put 0 into tLength
else
- get the selectedChunk
-
- local tFrom, tTo
- put word 2 of it into tFrom
- put word 4 of it into tTo
-
- local tAt, tLength
- if tFrom > tTo then
- put tFrom into tAt
- put 0 into tLength
- else
- put tFrom into tAt
- put tTo - tFrom into tLength
- end if
-
- textReplace tAt, char tAt to tAt + tLength - 1 of field "Script" of me, tab
+ put tFrom into tAt
+ put tTo - tFrom into tLength
end if
+
+ textReplace tAt, char tAt to tAt + tLength - 1 of field "Script" of me, tab
end if
end tabKey
@@ -2427,7 +2430,7 @@ on rawKeyDown pKey
local tPass = true
if there is a stack "com.livecode.script-library.autocomplete" then
- ideAutocompleteHandleArrow the long id of me, tKeyName, sObjectId, sPlaceholders, sEditPlaceholder, sEditChunks
+ ideAutocompleteHandleArrow the long id of me, tKeyName
put the result into tPass
end if
@@ -3442,8 +3445,6 @@ private command __SelectPlaceholder pUUID, pFromParagraph, pToParagraph, pStyled
if the number of elements of sEditChunks > 0 then
-- select the first chunk
select char sEditChunks[1]["start"] to sEditChunks[1]["end"] of field "script" of me
- else if exists(tChunk) then
- select tChunk
end if
end __SelectPlaceholder
diff --git a/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript b/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript
index 11fc529..459f7ea 100644
--- a/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript
+++ b/Toolset/palettes/script editor/behaviors/revsemenubarbehavior.livecodescript
@@ -136,7 +136,7 @@ private command buildEditMenu pContext
"Find Selection/^#F" & return & \
"Go.../L" & return after tEdit
- if there is a stack "com.livecode.palette.autocomplete-pro" then
+ if there is a stack "com.livecode.palette.autocomplete-plus" then
put "Autocomplete Snippets..." & return after tEdit
end if
diff --git a/Toolset/palettes/script editor/behaviors/revsestackbehavior.livecodescript b/Toolset/palettes/script editor/behaviors/revsestackbehavior.livecodescript
index 942d08d..1cfef30 100644
--- a/Toolset/palettes/script editor/behaviors/revsestackbehavior.livecodescript
+++ b/Toolset/palettes/script editor/behaviors/revsestackbehavior.livecodescript
@@ -2187,7 +2187,7 @@ command actionQuit
end actionQuit
command actionAutocompleteSnippetManager
- modeless "com.livecode.palette.autocomplete-pro"
+ modeless "com.livecode.palette.autocomplete-plus"
end actionAutocompleteSnippetManager
################################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.