Skip to content

Commit f6d8089

Browse files
committed
git-commit: show better message on non text files
We cannot (yet?) display non-textual files. Show a message on such cases.
1 parent e6fcfa9 commit f6d8089

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/plugins/git/CommitForm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ void CommitForm::newFileSelected(const QString &filename, GitFileStatus status)
448448
}
449449
auto score = p->canOpenFile(fullFilePath);
450450
if (score == 1) {
451-
// qDebug() << "Text editor plugin says this is not a text file" << score <<
452-
// fullFilePath;
451+
auto langInfo = ::Qutepart::chooseLanguage({}, {}, "filename.txt");
452+
updateEditor(tr("Not a text file"), highlighter);
453453
break;
454454
}
455455

0 commit comments

Comments
 (0)