Skip to content

Tide mode broken in temp buffers #378

@elibarzilay

Description

@elibarzilay

(Apologies if this is known, I can't look at where exactly this is coming from...)

When tide is used for a temp buffer (which means that there is no file that holds the content) I keep getting errors like the below. It's particularly bad since I'm using magit, which tends to create such buffers in many cases (ie, to show a file at a particular commit, which is not actually in the FS).

Error processing request. Cannot read property 'replace' of null
TypeError: Cannot read property 'replace' of null
    at normalizeSlashes (/home/eli/ts/ts/built/local/tsserver.js:6305:21)
    at Object.normalizePath (/home/eli/ts/ts/built/local/tsserver.js:6414:16)
    at Object.toNormalizedPath (/home/eli/ts/ts/built/local/tsserver.js:142034:23)
    at IOSession.Session.getFileAndProjectWorker (/home/eli/ts/ts/built/local/tsserver.js:149309:35)
    at IOSession.Session.getFileAndProject (/home/eli/ts/ts/built/local/tsserver.js:149293:29)
    at IOSession.Session.getQuickInfoWorker (/home/eli/ts/ts/built/local/tsserver.js:149368:31)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (/home/eli/ts/ts/built/local/tsserver.js:148365:61)
    at /home/eli/ts/ts/built/local/tsserver.js:150050:88
    at IOSession.Session.executeWithRequestId (/home/eli/ts/ts/built/local/tsserver.js:150041:28)
    at IOSession.Session.executeCommand (/home/eli/ts/ts/built/local/tsserver.js:150050:33)
    at IOSession.Session.onMessage (/home/eli/ts/ts/built/local/tsserver.js:150074:35)
    at Interface.<anonymous> (/home/eli/ts/ts/built/local/tsserver.js:151390:27)
    at Interface.emit (events.js:210:5)
    at Interface._onLine (readline.js:316:10)
    at Interface._normalWrite (readline.js:461:12)
    at Socket.ondata (readline.js:172:10)
    at Socket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:326:12)
    at readableAddChunk (_stream_readable.js:301:11)
    at Socket.Readable.push (_stream_readable.js:235:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:182:23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions