Commit be6fde5a authored by ransome1's avatar ransome1
Browse files

Fixed auto complete bug

parent 2877852b
{
"name": "sleek",
"productName": "sleek",
"version": "1.2.7",
"version": "1.2.8",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"category": "ProjectManagement",
......
name: sleek
base: core18
version: "1.2.7"
version: "1.2.8"
summary: todo.txt manager for Linux, free and open-source (FOSS)
description: |
sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripped down to only the most necessary features, and with a clean and simple interface, sleek aims to help you focus on getting things done.
......
......@@ -66,11 +66,6 @@ function saveFilter(newFilter, oldFilter, category) {
handleError(error);
});
console.log(items.objects)
console.log(items.objects.toString())
return false;
// write the data to the file
// a newline character is added to prevent other todo.txt apps to append new todos to the last line
window.api.send("replaceFileContent", [items.objects.join("\n").toString() + "\n"]);
......@@ -285,7 +280,9 @@ function addFilterToInput(filter, autoCompletePrefix) {
const caretPosition = getCaretPosition(modalFormInput);
// split string into elements
const inputElements = modalFormInput.value.split(/[^\r\n]+/);
//const inputElements = modalFormInput.value.split(/[^\r\n]+/);
const inputElements = modalFormInput.value.split(" ");
let i;
let x = 0;
for(i = 0; i < inputElements.length; i++) {
......@@ -295,7 +292,7 @@ function addFilterToInput(filter, autoCompletePrefix) {
}
inputElements.splice(i, 1, autoCompletePrefix + filter + " ");
modalFormInput.value = inputElements.join(" ");
// empty autoCompleteValue to prevent multiple inputs using multiple Enter presses
......
......@@ -29,4 +29,5 @@ x 2022-07-01 This is a test todo that needs to be archived
x 2022-09-29 This is a test todo that needs to be archived
x 2022-10-04 This is a test todo that needs to be archived
x 2022-10-06 This is a test todo that needs to be archived
x 2022-10-18 This is a test todo that needs to be archived
\ No newline at end of file
x 2022-10-18 This is a test todo that needs to be archived
x 2022-10-19 This is a test todo that needs to be archived
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment