@rbxts/centurion-ui 1.0.0-dev-ac608c1 → 1.0.0-dev-0822e84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,10 +226,8 @@ local function TerminalTextField(_param)
226
226
  end
227
227
  local newText = text()
228
228
  local otherSuggestion = suggestion.others[1]
229
- if (string.match(otherSuggestion, "%s")) ~= nil then
230
- otherSuggestion = `"{otherSuggestion}"`
231
- end
232
- local _otherSuggestion = otherSuggestion
229
+ local _newText = newText
230
+ local _exp = #newText
233
231
  local _result = currentTextPart()
234
232
  if _result ~= nil then
235
233
  _result = #_result
@@ -238,7 +236,8 @@ local function TerminalTextField(_param)
238
236
  if _condition_1 == nil then
239
237
  _condition_1 = 0
240
238
  end
241
- newText ..= string.sub(_otherSuggestion, _condition_1 + 1)
239
+ newText = string.sub(_newText, 0, _exp - _condition_1)
240
+ newText ..= if #{ string.match(otherSuggestion, "%s") } == 0 then otherSuggestion else `"{otherSuggestion}"`
242
241
  if argIndex < #commandArgs - 1 then
243
242
  newText ..= " "
244
243
  end
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rbxts/centurion-ui",
3
3
  "description": "Terminal UI for the Centurion command framework",
4
- "version": "1.0.0-dev-ac608c1",
4
+ "version": "1.0.0-dev-0822e84",
5
5
  "author": "paradoxuum",
6
6
  "license": "MIT",
7
7
  "main": "out/init.lua",
@@ -32,7 +32,7 @@
32
32
  "dev": "shx rm -rf out && rbxtsc -w"
33
33
  },
34
34
  "devDependencies": {
35
- "@rbxts/centurion": "^1.0.0-dev-ac608c1",
35
+ "@rbxts/centurion": "^1.0.0-dev-0822e84",
36
36
  "@rbxts/compiler-types": "2.3.0-types.1",
37
37
  "@rbxts/types": "^1.0.794",
38
38
  "roblox-ts": "2.3.0-dev-26ec859",