Skip to content

Commit 0fa99b1

Browse files
committed
Changed 'selection' to 'onlySelected'.
Signed-off-by: ubi de feo <me@ubidefeo.com>
1 parent 9908d4a commit 0fa99b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/arduino/store.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,15 @@ async function store(state, emitter) {
205205
})
206206

207207
// CODE EXECUTION
208-
emitter.on('run', async (selection = false) => {
208+
emitter.on('run', async (onlySelected = false) => {
209209
log('run')
210210
const openFile = state.openFiles.find(f => f.id == state.editingFile)
211211
let code = openFile.editor.editor.state.doc.toString()
212212

213213
// If there is a selection, run only the selected code
214214
const startIndex = openFile.editor.editor.state.selection.ranges[0].from
215215
const endIndex = openFile.editor.editor.state.selection.ranges[0].to
216-
if (endIndex - startIndex > 0 && selection) {
216+
if (endIndex - startIndex > 0 && onlySelected) {
217217
selectedCode = openFile.editor.editor.state.doc.toString().substring(startIndex, endIndex)
218218
// Checking to see if the user accidentally double-clicked some whitespace
219219
// While a random selection would yield an error when executed,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy