mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 10:36:30 +03:00
Closes SpartanJ/ecode#61.
This commit is contained in:
@@ -358,6 +358,9 @@ Int32 Text::findCharacterFromPos( const Vector2i& pos, bool ) const {
|
||||
if ( mString[start] == '\n' && start + 1 < mString.size() ) {
|
||||
start++;
|
||||
}
|
||||
|
||||
if ( end >= mGlyphCache.size() )
|
||||
end = mGlyphCache.size() - 1;
|
||||
|
||||
for ( std::size_t i = start; i <= end; ++i ) {
|
||||
charCenter.x = mGlyphCache[i].Left;
|
||||
|
||||
@@ -35,8 +35,6 @@ Process::Process( const std::string& command, const Uint32& options,
|
||||
|
||||
Process::~Process() {
|
||||
mShuttingDown = true;
|
||||
if ( mProcess )
|
||||
destroy();
|
||||
if ( mProcess && isAlive() )
|
||||
kill();
|
||||
if ( mStdOutThread.joinable() )
|
||||
|
||||
1
src/thirdparty/subprocess/subprocess.h
vendored
1
src/thirdparty/subprocess/subprocess.h
vendored
@@ -1153,6 +1153,7 @@ int subprocess_terminate(struct subprocess_s *const process) {
|
||||
TerminateProcess(process->hProcess, killed_process_exit_code);
|
||||
success_terminate = (windows_call_result == 0) ? 1 : 0;
|
||||
process->alive = 0;
|
||||
process->hProcess = NULL;
|
||||
return success_terminate;
|
||||
#else
|
||||
int result;
|
||||
|
||||
@@ -55,7 +55,8 @@ std::string LSPClientServerManager::findRootPath( const LSPDefinition& lsp,
|
||||
const std::shared_ptr<TextDocument>& doc ) {
|
||||
if ( lsp.rootIndicationFileNames.empty() || !doc->hasFilepath() )
|
||||
return "";
|
||||
std::string rootPath( doc->getFileInfo().getDirectoryPath() );
|
||||
std::string oriRootPath( doc->getFileInfo().getDirectoryPath() );
|
||||
std::string rootPath( oriRootPath );
|
||||
std::string lRootPath;
|
||||
FileSystem::dirAddSlashAtEnd( rootPath );
|
||||
|
||||
@@ -73,7 +74,7 @@ std::string LSPClientServerManager::findRootPath( const LSPDefinition& lsp,
|
||||
rootPath = FileSystem::removeLastFolderFromPath( rootPath );
|
||||
}
|
||||
|
||||
return "";
|
||||
return oriRootPath;
|
||||
}
|
||||
|
||||
void LSPClientServerManager::tryRunServer( const std::shared_ptr<TextDocument>& doc ) {
|
||||
|
||||
Reference in New Issue
Block a user