Skip to content

Commit 7ecf779

Browse files
committed
fixed bug involving emulated tab
1 parent 0f7c526 commit 7ecf779

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

source/DialogTabs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "DocumentWidget.h"
44
#include "Help.h"
55
#include "LanguageMode.h"
6+
#include "TextArea.h"
67
#include "preferences.h"
78
#include "TextBuffer.h"
89

@@ -28,7 +29,7 @@ DialogTabs::DialogTabs(DocumentWidget *document, QWidget *parent, Qt::WindowFlag
2829
useTabs = GetPrefInsertTabs();
2930
tabDist = GetPrefTabDist(PLAIN_LANGUAGE_MODE);
3031
} else {
31-
emTabDist = ui.editEmulatedTabSpacing->text().toInt();
32+
emTabDist = document->firstPane()->getEmulateTabs();
3233
useTabs = document->buffer_->BufGetUseTabs();
3334
tabDist = document->buffer_->BufGetTabDistance();
3435
}

source/TextArea.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6825,7 +6825,7 @@ void TextArea::setAutoShowInsertPos(bool value) {
68256825
P_autoShowInsertPos = value;
68266826
}
68276827

6828-
void TextArea::setEmulateTabs(bool value) {
6828+
void TextArea::setEmulateTabs(int value) {
68296829
P_emulateTabs = value;
68306830
}
68316831

source/TextArea.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class TextArea : public QAbstractScrollArea {
9292
void setWordDelimiters(const QString &delimiters);
9393
void setBacklightCharTypes(const QString &charTypes);
9494
void setAutoShowInsertPos(bool value);
95-
void setEmulateTabs(bool value);
95+
void setEmulateTabs(int value);
9696
void setWrapMargin(int value);
9797
void setLineNumCols(int value);
9898
void setReadOnly(bool value);

0 commit comments

Comments
 (0)