mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Remove Buffer.proto.getMode. All ace interaction should be mediated by LanguageMode
This commit is contained in:
parent
d04d4e22a2
commit
5f20b09284
@ -164,22 +164,6 @@ class Buffer
|
||||
isModified: ->
|
||||
@modified
|
||||
|
||||
getMode: ->
|
||||
return @mode if @mode
|
||||
extension = if @getPath() then @getPath().split('/').pop().split('.').pop() else null
|
||||
modeName = switch extension
|
||||
when 'js' then 'javascript'
|
||||
when 'coffee' then 'coffee'
|
||||
when 'rb', 'ru' then 'ruby'
|
||||
when 'c', 'h', 'cpp' then 'c_cpp'
|
||||
when 'html', 'htm' then 'html'
|
||||
when 'css' then 'css'
|
||||
when 'java' then 'java'
|
||||
when 'xml' then 'xml'
|
||||
else 'text'
|
||||
|
||||
@mode = new (require("ace/mode/#{modeName}").Mode)
|
||||
|
||||
matchesInCharacterRange: (regex, startIndex, endIndex) ->
|
||||
text = @getText()
|
||||
matches = []
|
||||
|
Loading…
Reference in New Issue
Block a user