Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit 3814ea7

Browse files
committed
Fix #34
1 parent d0c3f7b commit 3814ea7

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

core/CLI.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ private function extension(){
8282

8383
private function record(){
8484
if( isset($this->parser->getCommands()[0]) && $this->parser->getCommands()[0] == 'inTerminalDialog' ){
85-
(new Recorder(true))->record();
85+
(new Recorder(false, true))->record();
8686
}
8787
else {
8888
$this->output->print(array(
8989
'Force new record',
9090
array('Add command '. CLIOutput::colorString('inTerminalDialog', CLIOutput::BLUE) . ' to do a normal record using the InTerminalDialog.')
9191
));
92-
(new Recorder())->record(true);
92+
(new Recorder(false))->record(true);
9393
if( !Config::getRecordStatus(false) ){
9494
$this->togglePause(); // make sure to enable
9595
}

core/Recorder.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Recorder {
77
private Dialog $dialog;
88
private $lockfileHandle;
99

10-
public function __construct(bool $inTerminal = false) {
10+
public function __construct(bool $newSocket = true, bool $inTerminal = false) {
1111
if($inTerminal){
1212
$this->dialog = new InTerminalDialog();
1313
}
@@ -16,7 +16,9 @@ public function __construct(bool $inTerminal = false) {
1616
case Utilities::OS_MAC:
1717
MacDialog::checkOSPackages();
1818
$this->dialog = new MacDialog();
19-
AutocompleteSocket::createSocketThread();
19+
if($newSocket){
20+
AutocompleteSocket::createSocketThread();
21+
}
2022
break;
2123
case Utilities::OS_LINUX:
2224
LinuxDialog::checkOSPackages();
@@ -25,7 +27,9 @@ public function __construct(bool $inTerminal = false) {
2527
case Utilities::OS_WIN:
2628
WindowsDialog::checkOSPackages();
2729
$this->dialog = new WindowsDialog();
28-
AutocompleteSocket::createSocketThread();
30+
if($newSocket){
31+
AutocompleteSocket::createSocketThread();
32+
}
2933
break;
3034
case Utilities::OS_TELEGRAM:
3135
TelegramDialog::checkOSPackages();

core/Utilities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
class Utilities {
66

7-
const VERSION = 'v1.0.16';
7+
const VERSION = 'v1.1.0';
88

99
const DEFAULT_LINE_LENGTH = 125;
1010

0 commit comments

Comments
 (0)