Skip to content

Commit 01069d2

Browse files
committed
Add warning/error marks in the gutter
1 parent 1a1827d commit 01069d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Support/lib/make.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ def perform_make(target = nil)
5555
def make_txmt_link(dirs, file, lineno, column, title, message)
5656
path = dirs.map{ |dir| File.expand_path(file, dir) }.find{ |path| File.file? path }
5757
unless path.nil?
58+
unless lineno.nil?
59+
value = (message =~ /^\s*(error|warning|note):/ ? $1 : "warning") + ":#{message}"
60+
args = [ "--line=#{lineno}:#{column || '1'}", "--set-mark=#{value}" ]
61+
args << path if path != ENV['TM_FILEPATH'] || !ENV.has_key?('TM_FILE_IS_UNTITLED')
62+
system(ENV['TM_MATE'], *args)
63+
end
64+
5865
parms = [ "url=file://#{e_url path}" ]
5966
parms << [ "line=#{lineno}" ] unless lineno.nil?
6067
parms << [ "column=#{column}" ] unless column.nil?

0 commit comments

Comments
 (0)