This commit is contained in:
Martín Lucas Golini
2023-02-23 01:30:17 -03:00
parent 353988f292
commit bf367b0dcb
4 changed files with 7 additions and 4 deletions

View File

@@ -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;

View File

@@ -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() )

View File

@@ -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;

View File

@@ -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 ) {