mirror of
https://github.com/atom/atom.git
synced 2026-02-15 09:05:58 -05:00
Merge branch 'master' into jl-all-your-normalizes
This commit is contained in:
@@ -162,8 +162,8 @@ class ApplicationMenu
|
||||
firstKeystroke = keystrokesByCommand[command]?[0]
|
||||
return null unless firstKeystroke
|
||||
|
||||
modifiers = firstKeystroke.split('-')
|
||||
key = modifiers.pop()
|
||||
modifiers = firstKeystroke.split(/-(?=.)/)
|
||||
key = modifiers.pop().toUpperCase().replace('+', 'Plus')
|
||||
|
||||
modifiers = modifiers.map (modifier) ->
|
||||
modifier.replace(/shift/ig, "Shift")
|
||||
@@ -171,5 +171,5 @@ class ApplicationMenu
|
||||
.replace(/ctrl/ig, "Ctrl")
|
||||
.replace(/alt/ig, "Alt")
|
||||
|
||||
keys = modifiers.concat([key.toUpperCase()])
|
||||
keys = modifiers.concat([key])
|
||||
keys.join("+")
|
||||
|
||||
@@ -424,12 +424,7 @@ class AtomApplication
|
||||
for window in @windows
|
||||
if loadSettings = window.getLoadSettings()
|
||||
unless loadSettings.isSpec
|
||||
states.push(_.pick(loadSettings,
|
||||
'initialPaths'
|
||||
'devMode'
|
||||
'safeMode'
|
||||
'apiPreviewMode'
|
||||
))
|
||||
states.push(initialPaths: loadSettings.initialPaths)
|
||||
@storageFolder.store('application.json', states)
|
||||
|
||||
loadState: ->
|
||||
@@ -438,9 +433,9 @@ class AtomApplication
|
||||
@openWithOptions({
|
||||
pathsToOpen: state.initialPaths
|
||||
urlsToOpen: []
|
||||
devMode: state.devMode
|
||||
safeMode: state.safeMode
|
||||
apiPreviewMode: state.apiPreviewMode
|
||||
devMode: @devMode
|
||||
safeMode: @safeMode
|
||||
apiPreviewMode: @apiPreviewMode
|
||||
})
|
||||
true
|
||||
else
|
||||
@@ -517,6 +512,8 @@ class AtomApplication
|
||||
return {pathToOpen} unless pathToOpen
|
||||
return {pathToOpen} if fs.existsSync(pathToOpen)
|
||||
|
||||
pathToOpen = pathToOpen.replace(/[:\s]+$/, '')
|
||||
|
||||
[fileToOpen, initialLine, initialColumn] = path.basename(pathToOpen).split(':')
|
||||
return {pathToOpen} unless initialLine
|
||||
return {pathToOpen} unless parseInt(initialLine) >= 0
|
||||
|
||||
@@ -1120,7 +1120,7 @@ class DisplayBuffer extends Model
|
||||
{screenLines, regions} = @buildScreenLines(startBufferRow, endBufferRow + bufferDelta)
|
||||
screenDelta = screenLines.length - (endScreenRow - startScreenRow)
|
||||
|
||||
@screenLines[startScreenRow...endScreenRow] = screenLines
|
||||
_.spliceWithArray(@screenLines, startScreenRow, endScreenRow - startScreenRow, screenLines, 10000)
|
||||
@rowMap.spliceRegions(startBufferRow, endBufferRow - startBufferRow, regions)
|
||||
@findMaxLineLength(startScreenRow, endScreenRow, screenLines, screenDelta)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user