aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/PlainTextEditorPage.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-01-12 04:04:00 +0000
committerSaturneric <[email protected]>2022-01-12 04:04:00 +0000
commitf906fcc9fedf163c607ddc27c30aa956d4cbefd2 (patch)
tree2d613baeb1d1c966a9d789fb924b004ba3d5b256 /src/ui/widgets/PlainTextEditorPage.cpp
parent<refactor, feat>(ui): Text editor improvements. (diff)
downloadGpgFrontend-f906fcc9fedf163c607ddc27c30aa956d4cbefd2.tar.gz
GpgFrontend-f906fcc9fedf163c607ddc27c30aa956d4cbefd2.zip
<fixed>(ui): Fix not detecting end of file.
Diffstat (limited to 'src/ui/widgets/PlainTextEditorPage.cpp')
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/widgets/PlainTextEditorPage.cpp b/src/ui/widgets/PlainTextEditorPage.cpp
index 1a99c2a6..6fe8977e 100644
--- a/src/ui/widgets/PlainTextEditorPage.cpp
+++ b/src/ui/widgets/PlainTextEditorPage.cpp
@@ -59,7 +59,8 @@ PlainTextEditorPage::PlainTextEditorPage(QString filePath, QWidget* parent)
auto text = ui->textPage->document()->toPlainText();
auto str = boost::format(_("%1% character(s)")) % text.size();
this->ui->characterLabel->setText(str.str().c_str());
-
+
+ detect_cr_lf(text);
detect_encoding(text.toStdString());
});