Comparar commits

...

7 Commits

Autor SHA1 Mensagem Data
Kevin Sawicki e7c090425f Merge branch 'dev' 2013-02-28 15:21:43 -08:00
Kevin Sawicki cb6ce5aece Bump version to 0.2 2013-02-28 15:21:24 -08:00
Kevin Sawicki 67db5c4beb Merge branch 'dev' 2013-02-28 15:20:19 -08:00
Kevin Sawicki e36a3c18fb Remove .coffee extension from package main 2013-02-28 15:15:09 -08:00
Kevin Sawicki 35ca8a42a1 Display error when symbol's file does not exist 2013-02-28 15:06:48 -08:00
Kevin Sawicki 1b71796698 Check for escaped backslashes in tag patterns
Previously readtags.c was not checking if the
end pattern / was preceded by an escaped \
which would cause segmentation faults for patterns
that ended with an escaped \.
2013-02-28 14:49:30 -08:00
Kevin Sawicki 56d92fe029 Hide/show loading message instead of toggling 2013-02-28 11:25:02 -08:00
6 arquivos alterados com 49 adições e 11 exclusões
+2 -2
Ver Arquivo
@@ -29,11 +29,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<string>0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<string>0.2</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>NSMainNibFile</key>
+12 -1
Ver Arquivo
@@ -321,7 +321,18 @@ static void parseTagLine (tagFile *file, tagEntry *const entry)
do
{
p = strchr (p + 1, delimiter);
} while (p != NULL && *(p - 1) == '\\');
if (p == NULL)
break;
if (*(p - 1) != '\\')
break;
// Make sure preceeding backslas isn't an escaped backslash by
// advancing backwards and counting the number of backslashes
int slashCount = 1;
while (*(p - slashCount - 1) == '\\')
slashCount++;
if (slashCount % 2 == 0)
break;
} while (1);
if (p == NULL)
{
/* invalid pattern */
@@ -88,9 +88,6 @@ class CommandPanelView extends View
else
@miniEditor.focus()
toggleLoading: ->
@loadingMessage.toggle()
onExpandAll: (event) =>
@previewList.expandAllPaths()
@previewList.focus()
@@ -119,12 +116,12 @@ class CommandPanelView extends View
@miniEditor.getText()
execute: (command=@escapedCommand())->
@toggleLoading()
@loadingMessage.show()
@errorMessages.empty()
try
@commandInterpreter.eval(command, rootView.getActiveEditSession()).done ({operationsToPreview, errorMessages}) =>
@toggleLoading()
@loadingMessage.hide()
@history.push(command)
@historyIndex = @history.length
+1 -1
Ver Arquivo
@@ -1 +1 @@
'main': 'lib/spell-check.coffee'
'main': 'lib/spell-check'
@@ -77,8 +77,12 @@ class SymbolsView extends SelectList
setTimeout (=> @cancel()), 2000
confirmed : (tag) ->
@cancel()
@openTag(tag)
if tag.file and not fs.isFile(project.resolve(tag.file))
@setError('Selected file does not exist')
setTimeout((=> @setError()), 2000)
else
@cancel()
@openTag(tag)
openTag: (tag) ->
position = tag.position
@@ -201,3 +201,29 @@ describe "SymbolsView", ->
expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'tagged.js'
expect(symbolsView).not.toHaveClass "error"
expect(symbolsView.error).not.toBeVisible()
describe "when selecting a tag", ->
describe "when the file doesn't exist", ->
renamedPath = null
beforeEach ->
renamedPath = project.resolve("tagged-renamed.js")
fs.remove(renamedPath) if fs.exists(renamedPath)
fs.move(project.resolve("tagged.js"), renamedPath)
afterEach ->
fs.move(renamedPath, project.resolve("tagged.js"))
it "doesn't open the editor", ->
rootView.trigger "symbols-view:toggle-project-symbols"
symbolsView = rootView.find('.symbols-view').view()
waitsFor ->
setArraySpy.callCount > 0
runs ->
spyOn(rootView, 'open').andCallThrough()
symbolsView.list.children('li:first').mousedown().mouseup()
expect(rootView.open).not.toHaveBeenCalled()
expect(symbolsView.error.text().length).toBeGreaterThan 0
expect(symbolsView).toHaveClass "error"