Skip to content

Commit

Permalink
Use TextMate’s display name for untitled documents
Browse files Browse the repository at this point in the history
Also remove use of rescan_project (as this is a no-op in 2.0).
  • Loading branch information
sorbits committed Feb 6, 2013
1 parent 61ec837 commit acfb7ba
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Commands/Active File With Arbitrary File….tmCommand
Expand Up @@ -21,7 +21,7 @@ APPLESCRIPT)
if [[ "$file" == "" ]]; then exit_discard; fi
if diff --strip-trailing-cr --label "$file" --label "${TM_FILENAME:-untitled}" -u "$file" -; then
if diff --strip-trailing-cr --label "$file" --label "${TM_DISPLAYNAME}" -u "$file" -; then
exit_show_tool_tip "There are no differences."
fi
</string>
Expand Down
3 changes: 0 additions & 3 deletions Commands/Apply Patch from Clipboard.tmCommand
Expand Up @@ -15,9 +15,6 @@ if [[ -z $TM_FILEPATH ]]
then exit_discard
else pbpaste | patch "$TM_FILEPATH" -p0
fi
# Reload patched file
rescan_project
</string>
<key>fallbackInput</key>
<string>none</string>
Expand Down
2 changes: 1 addition & 1 deletion Commands/Diff Buffer With Clipboard.plist
Expand Up @@ -9,7 +9,7 @@
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# set defaultCStringEncoding to UTF-8
if diff --strip-trailing-cr --label "${TM_FILENAME:-untitled}" --label "(clipboard)" -u - &lt;(__CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbpaste); then
if diff --strip-trailing-cr --label "${TM_DISPLAYNAME}" --label "(clipboard)" -u - &lt;(__CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbpaste); then
echo "There are no differences."
else
exit_create_new_document
Expand Down
2 changes: 1 addition & 1 deletion Commands/Merge Selected Files.plist
Expand Up @@ -13,7 +13,7 @@ export __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100
eval arr=("$TM_SELECTED_FILES")
if [[ ${#arr[@]} == 2 ]];
then ${TM_OPENDIFF:-opendiff} "${arr[0]}" "${arr[1]}"; rescan_project
then ${TM_OPENDIFF:-opendiff} "${arr[0]}" "${arr[1]}"
else echo -e "You need to select exactly two\nfiles in the project drawer."
fi
</string>
Expand Down

0 comments on commit acfb7ba

Please sign in to comment.