diff --git a/dist/CNC/GRBL/index.html.gz b/dist/CNC/GRBL/index.html.gz
index 599e6ede..8765ba2f 100644
Binary files a/dist/CNC/GRBL/index.html.gz and b/dist/CNC/GRBL/index.html.gz differ
diff --git a/dist/CNC/GRBLHal/index.html.gz b/dist/CNC/GRBLHal/index.html.gz
index 9fa37cd4..b125940f 100644
Binary files a/dist/CNC/GRBLHal/index.html.gz and b/dist/CNC/GRBLHal/index.html.gz differ
diff --git a/dist/Plotter/HP-GL/index.html.gz b/dist/Plotter/HP-GL/index.html.gz
index ebdbb9f5..fc7723e7 100644
Binary files a/dist/Plotter/HP-GL/index.html.gz and b/dist/Plotter/HP-GL/index.html.gz differ
diff --git a/dist/Printer3D/Marlin-embedded/index.html.gz b/dist/Printer3D/Marlin-embedded/index.html.gz
index 5a143668..e756346d 100644
Binary files a/dist/Printer3D/Marlin-embedded/index.html.gz and b/dist/Printer3D/Marlin-embedded/index.html.gz differ
diff --git a/dist/Printer3D/Marlin/index.html.gz b/dist/Printer3D/Marlin/index.html.gz
index b6153738..0edfd7ea 100644
Binary files a/dist/Printer3D/Marlin/index.html.gz and b/dist/Printer3D/Marlin/index.html.gz differ
diff --git a/dist/Printer3D/Repetier/index.html.gz b/dist/Printer3D/Repetier/index.html.gz
index 72d6a94e..4923661b 100644
Binary files a/dist/Printer3D/Repetier/index.html.gz and b/dist/Printer3D/Repetier/index.html.gz differ
diff --git a/dist/Printer3D/Smoothieware/index.html.gz b/dist/Printer3D/Smoothieware/index.html.gz
index 7a140099..92bbc126 100644
Binary files a/dist/Printer3D/Smoothieware/index.html.gz and b/dist/Printer3D/Smoothieware/index.html.gz differ
diff --git a/dist/SandTable/GRBL/index.html.gz b/dist/SandTable/GRBL/index.html.gz
index ea81573e..5237b3d9 100644
Binary files a/dist/SandTable/GRBL/index.html.gz and b/dist/SandTable/GRBL/index.html.gz differ
diff --git a/src/components/App/version.js b/src/components/App/version.js
index 348fea28..12780647 100644
--- a/src/components/App/version.js
+++ b/src/components/App/version.js
@@ -17,7 +17,7 @@
*/
import { h } from "preact"
import { webUIbuild } from "../../targets"
-export const webUIversion = "3.0.0-a69"
+export const webUIversion = "3.0.0-a70"
export const Esp3dVersion = () => (
{webUIversion}.{webUIbuild}
diff --git a/src/components/Panels/Terminal.js b/src/components/Panels/Terminal.js
index 96479e81..10683683 100644
--- a/src/components/Panels/Terminal.js
+++ b/src/components/Panels/Terminal.js
@@ -59,7 +59,7 @@ const TerminalPanel = () => {
const messagesEndRef = useRef(null)
const terminalOutput = useRef(null)
const id = "terminalPanel"
- const inputHistoryIndex = useRef(terminal.inputHistory.length - 1)
+ const inputHistoryIndex = useRef(terminal.inputHistory.length )
const scrollToBottom = () => {
if (
terminal.isAutoScroll.current &&
@@ -70,17 +70,17 @@ const TerminalPanel = () => {
}
}
const historyPrev = () => {
- if (terminal.inputHistory.length > 0 && inputHistoryIndex.current >= 0) {
+ if (terminal.inputHistory.length > 0 && inputHistoryIndex.current > 0) {
+ inputHistoryIndex.current--
inputRef.current.value = terminal.inputHistory[inputHistoryIndex.current]
terminal.input.current = inputRef.current.value
- inputHistoryIndex.current--
}
}
const historyNext = () => {
if (
terminal.inputHistory.length > 0 &&
- inputHistoryIndex.current < terminal.inputHistory.length - 1
+ inputHistoryIndex.current < terminal.inputHistory.length-1
) {
inputHistoryIndex.current++
inputRef.current.value = terminal.inputHistory[inputHistoryIndex.current]
@@ -88,7 +88,8 @@ const TerminalPanel = () => {
} else {
inputRef.current.value = ""
terminal.input.current = inputRef.current.value
- }
+ inputHistoryIndex.current = terminal.inputHistory.length
+ }
}
const onKeyUp = (e) => {
switch (e.keyCode) {
@@ -122,7 +123,7 @@ const TerminalPanel = () => {
) {
terminal.addInputHistory(cmd)
}
- inputHistoryIndex.current = terminal.inputHistory.length - 1
+ inputHistoryIndex.current = terminal.inputHistory.length
processData(
"echo",
replaceVariables(variablesList.commands, cmd, true)
@@ -142,9 +143,8 @@ const TerminalPanel = () => {
},
}
)
- } else {
- inputHistoryIndex.current = terminal.inputHistory.length - 1
- }
+ }
+ inputHistoryIndex.current = terminal.inputHistory.length
terminal.input.current = ""
inputRef.current.value = ""
}