mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-29 17:46:29 +03:00
Fixed an old bug in syntax highlighting that sometimes the first line of the file was not correctly highlighted.
Added Svelte syntax highlighting support. Improved CSS syntax highlighting. Added "Open All Files in Folder" option when right click a folder in the folder tree view.
This commit is contained in:
@@ -2767,6 +2767,33 @@ void App::renameFile( const FileInfo& file ) {
|
||||
} );
|
||||
}
|
||||
|
||||
void App::openAllFilesInFolder( const FileInfo& folder ) {
|
||||
auto files =
|
||||
FileSystem::filesInfoGetInPath( folder.getDirectoryPath(), true, false, true,
|
||||
getFileSystemModel()->getDisplayConfig().ignoreHidden );
|
||||
|
||||
std::vector<std::string> supportedExts(
|
||||
SyntaxDefinitionManager::instance()->getExtensionsPatternsSupported() );
|
||||
std::vector<LuaPatternStorage> acceptedPatterns;
|
||||
acceptedPatterns.reserve( supportedExts.size() );
|
||||
for ( const auto& strPattern : supportedExts )
|
||||
acceptedPatterns.emplace_back( std::string{ strPattern } );
|
||||
|
||||
for ( const auto& file : files ) {
|
||||
if ( file.isRegularFile() ) {
|
||||
bool foundPattern = acceptedPatterns.empty();
|
||||
for ( auto& pattern : acceptedPatterns ) {
|
||||
if ( pattern.matches( file.getFilepath() ) ) {
|
||||
foundPattern = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( foundPattern )
|
||||
loadFileFromPath( file.getFilepath() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void App::toggleHiddenFiles() {
|
||||
mFileSystemModel = FileSystemModel::New( mFileSystemModel->getRootPath(),
|
||||
FileSystemModel::Mode::FilesAndDirectories,
|
||||
@@ -3497,7 +3524,7 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe
|
||||
mThreadPool->run( [this] {
|
||||
// Load language definitions
|
||||
Clock defClock;
|
||||
SyntaxDefinitionManager::createSingleton( 107 );
|
||||
SyntaxDefinitionManager::createSingleton( 108 );
|
||||
Language::LanguagesSyntaxHighlighting::load();
|
||||
SyntaxDefinitionManager::instance()->setLanguageExtensionsPriority(
|
||||
mConfig.languagesExtensions.priorities );
|
||||
|
||||
Reference in New Issue
Block a user