Hi, thanks for your great work on this package :smile: In my daily use of this package, I have encountered some problems and finally solved them. Here's the summary:
1.Fix the deprecated warning in Promise.done() d1fef2d3cc7832f3c8f4274bf6234182a35e700c
Promise.done() has been deprecated in recent Atom version:
# Preserve this deprecation until 2.0. Sorry. Should have removed Q sooner.
Promise.prototype.done = (callback) ->
deprecate("Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done")
@then(callback)
SelectListView will get a blur event as the GtagsFiles.open() activates the pane, which causes the list losing focus. And the SelectListView's blur callback calls the cancel().
3.Add a useRelativePath option in Package Settings b24eb299a341dff3f94f32571ab3be635d568f2f
Sometimes the file path of searching result is too long for the list to show. For example:
So I add an option to only show the relative path in the result list:
4.Change GtagsEnv to extend process.env rather than clone e7919f410cf539b83377b45357d6ac3a67ec8f99
The value assignment of cloned object will also change process.env, because they are sharing the same process level variable (current process's enviroment). See test below:
So we just need to extend a object that has same properties with process.env here:
5.Fix a race condition in GtagsFile.preview() 79a0ec1e6cd85a184fc92a1293b200faceaa7184
If the GtagsFile.preview is called twice in such a short time that the first subscription isn't invoked. Then the latter call will override GtagsFiles.subscription, which causes the former never be disposed().
Hi, thanks for your great work on this package :smile: In my daily use of this package, I have encountered some problems and finally solved them. Here's the summary:
1.Fix the deprecated warning in Promise.done() d1fef2d3cc7832f3c8f4274bf6234182a35e700c
Promise.done() has been deprecated in recent Atom version:
2.Fix GtagsSymbolsView's double cancel issue 0883e5dbbeda0025fc0bcfd5b4ef76edd2264744
SelectListView will get a
blur
event as theGtagsFiles.open()
activates the pane, which causes the list losing focus. And the SelectListView'sblur
callback calls the cancel().So we do not need to call cancel() here any more.
3.Add a useRelativePath option in Package Settings b24eb299a341dff3f94f32571ab3be635d568f2f
Sometimes the file path of searching result is too long for the list to show. For example: So I add an option to only show the relative path in the result list:
4.Change GtagsEnv to extend process.env rather than clone e7919f410cf539b83377b45357d6ac3a67ec8f99
The value assignment of cloned object will also change
process.env
, because they are sharing the same process level variable (current process's enviroment). See test below:So we just need to extend a object that has same properties with process.env here:
5.Fix a race condition in GtagsFile.preview() 79a0ec1e6cd85a184fc92a1293b200faceaa7184
If the
GtagsFile.preview
is called twice in such a short time that the first subscription isn't invoked. Then the latter call willoverride
GtagsFiles.subscription, which causes the former never be disposed().