Skip to content

Commit e2be292

Browse files
committed
even better messaging
1 parent 4b91ac7 commit e2be292

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/runtime/refactor.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Refactor {
3636
const _new = items['Rename']
3737
if (!isValidWordToInspect(_new) || _new.match(wordRegexWithoutDotAccessor) != _new) {
3838
atom.notifications.addWarning('Julia Client: Rename Refactor', {
39-
description: `\`${_new}\` is not a valid identifier`
39+
description: `\`${_new}\` isn't a valid identifier`
4040
})
4141
return
4242
}
@@ -66,6 +66,12 @@ class Refactor {
6666
if (result.text) {
6767
editor.setTextInBufferRange(range, result.text)
6868
}
69+
if (result.success) {
70+
atom.notifications.addSuccess('Julia Client: Rename Refactor', {
71+
description: result.success,
72+
dismissable: true
73+
})
74+
}
6975
if (result.info) {
7076
atom.notifications.addInfo('Julia Client: Rename Refactor', {
7177
description: result.info,
@@ -82,11 +88,6 @@ class Refactor {
8288
description: result.error
8389
})
8490
}
85-
if (result.success) {
86-
atom.notifications.addSuccess('Julia Client: Rename Refactor', {
87-
description: result.success
88-
})
89-
}
9091
})
9192
}).catch((err) => {
9293
if (err) console.error(err)

0 commit comments

Comments
 (0)