summaryrefslogtreecommitdiff
path: root/src/channel.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 7.4.1891v7.4.1891Bram Moolenaar2016-06-041-18/+53
| | | | | Problem: Channel reading very long lines is slow. Solution: Collapse multiple buffers until a NL is found.
* patch 7.4.1878v7.4.1878Bram Moolenaar2016-06-021-0/+21
| | | | | | | Problem: Whether a job has exited isn't detected until a character is typed. After calling exit_cb the cursor is in the wrong place. Solution: Don't wait forever for a character to be typed when there is a pending job. Update the screen if neede after calling exit_cb.
* patch 7.4.1859v7.4.1859Bram Moolenaar2016-05-291-19/+14
| | | | | Problem: Cannot use a function reference for "exit_cb". Solution: Use get_callback(). (Yegappan Lakshmanan)
* patch 7.4.1858v7.4.1858Bram Moolenaar2016-05-291-1/+5
| | | | | | Problem: When a channel writes to a buffer it doesn't find a buffer by the short name but re-uses it anyway. Solution: Find buffer also by the short name.
* patch 7.4.1857v7.4.1857Bram Moolenaar2016-05-291-6/+54
| | | | | | | Problem: When a channel appends to a buffer that is 'nomodifiable' there is an error but appending is done anyway. Solution: Add the 'modifiable' option. Refuse to write to a 'nomodifiable' when the value is 1.
* patch 7.4.1855v7.4.1855Bram Moolenaar2016-05-281-1/+11
| | | | | Problem: Valgrind reports memory leak for job that is not freed. Solution: Free all jobs on exit. Add test for failing job.
* patch 7.4.1853v7.4.1853Bram Moolenaar2016-05-281-1/+2
| | | | | | Problem: Crash when job and channel are in the same dict while using partials. (Luc Hermitte) Solution: Do not decrement the channel reference count too early.
* patch 7.4.1850v7.4.1850Bram Moolenaar2016-05-281-0/+5
| | | | | Problem: GUI freezes when using a job. (Shougo) Solution: Unregister the channel when there is an input error.
* patch 7.4.1849v7.4.1849Bram Moolenaar2016-05-271-0/+8
| | | | | | Problem: Still trying to read from channel that is going to be closed. (Ramel Eshed) Solution: Check if ch_to_be_closed is set.
* patch 7.4.1845v7.4.1845Bram Moolenaar2016-05-251-13/+13
| | | | | Problem: Mentioning NetBeans when reading from channel. (Ramel Eshed) Solution: Make the text more generic.
* patch 7.4.1829v7.4.1829Bram Moolenaar2016-05-091-0/+6
| | | | | Problem: No message on channel log when buffer was freed. Solution: Log a message.
* patch 7.4.1828v7.4.1828Bram Moolenaar2016-05-091-14/+53
| | | | | Problem: May try to access buffer that's already freed. Solution: When freeing a buffer remove it from any channel.
* patch 7.4.1827v7.4.1827Bram Moolenaar2016-05-091-2/+32
| | | | | Problem: No error when invoking a callback when it's not safe. Solution: Add an error message. Avoid the error when freeing a channel.
* patch 7.4.1826v7.4.1826Bram Moolenaar2016-05-091-2/+19
| | | | | | Problem: Callbacks are invoked when it's not safe. (Andrew Stewart) Solution: When a channel is to be closed don't invoke callbacks right away, wait for a safe moment.
* patch 7.4.1825v7.4.1825Bram Moolenaar2016-05-081-2/+8
| | | | | Problem: When job writes to buffer nothing is written. (Nicola) Solution: Do not discard a channel before writing is done.
* patch 7.4.1824v7.4.1824Bram Moolenaar2016-05-081-3/+3
| | | | | | | Problem: When a job is no longer referenced and does not have an exit callback the process may hang around in defunc state. (Nicola) Solution: Call job_status() if the job is running and won't get freed because it might still be useful.
* patch 7.4.1817v7.4.1817Bram Moolenaar2016-05-041-0/+7
| | | | | | Problem: The screen is not updated if a callback is invoked when closing a channel. Solution: Invoke redraw_after_callback().
* patch 7.4.1814v7.4.1814Bram Moolenaar2016-05-011-18/+25
| | | | | | | Problem: A channel may be garbage collected while it's still being used by a job. (James McCoy) Solution: Mark the channel as used if the job is still used. Do the same for channels that are still used.
* patch 7.4.1810v7.4.1810Bram Moolenaar2016-04-301-8/+6
| | | | | Problem: Sending DETACH after a channel was closed isn't useful. Solution: Only add DETACH for a netbeans channel.
* patch 7.4.1807v7.4.1807Bram Moolenaar2016-04-301-1/+2
| | | | | Problem: Test_out_close_cb sometimes fails. Solution: Always write DETACH to out, not err.
* patch 7.4.1791v7.4.1791Bram Moolenaar2016-04-261-5/+12
| | | | | | Problem: Channel could be garbage collected too early. Solution: Don't free a channel or remove it from a job when it is still useful.
* patch 7.4.1789v7.4.1789Bram Moolenaar2016-04-261-33/+68
| | | | | | Problem: Cannot use ch_read() in the close callback. Solution: Do not discard the channel if there is readahead. Do not discard readahead if there is a close callback.
* patch 7.4.1787v7.4.1787Bram Moolenaar2016-04-261-49/+84
| | | | | | | Problem: When a job ends the close callback is invoked before other callbacks. On Windows the close callback is not called. Solution: First invoke out/err callbacks before the close callback. Make the close callback work on Windows.
* patch 7.4.1750v7.4.1750Bram Moolenaar2016-04-181-7/+9
| | | | | | Problem: When a buffer gets updated while in command line mode, the screen may be messed up. Solution: Postpone the redraw when the screen is scrolled.
* patch 7.4.1727v7.4.1727Bram Moolenaar2016-04-141-8/+18
| | | | | | Problem: Cannot detect a crash in tests when caused by garbagecollect(). Solution: Add garbagecollect_for_testing(). Do not free a job if is still useful.
* patch 7.4.1719v7.4.1719Bram Moolenaar2016-04-081-19/+119
| | | | | | | | Problem: Leaking memory when there is a cycle involving a job and a partial. Solution: Add a copyID to job and channel. Set references in items referred by them. Go through all jobs and channels to find unreferenced items. Also, decrement reference counts when garbage collecting.
* patch 7.4.1717v7.4.1717Bram Moolenaar2016-04-071-17/+43
| | | | | Problem: Leaking memory when opening a channel fails. Solution: Unreference partials in job options.
* patch 7.4.1687v7.4.1687Bram Moolenaar2016-03-301-1/+1
| | | | | Problem: The channel close_cb option does not work. Solution: Use jo_close_partial instead of jo_err_partial. (Damien)
* patch 7.4.1680v7.4.1680Bram Moolenaar2016-03-281-2/+2
| | | | | Problem: Coverity warns for not checking name length (false positive). Solution: Only copy the characters we know are there.
* patch 7.4.1669v7.4.1669Bram Moolenaar2016-03-281-31/+262
| | | | | Problem: When writing buffer lines to a pipe Vim may block. Solution: Avoid blocking, write more lines later.
* patch 7.4.1668v7.4.1668Bram Moolenaar2016-03-281-9/+30
| | | | | Problem: channel_get_all() does multiple allocations. Solution: Compute the size and allocate once.
* patch 7.4.1667v7.4.1667Bram Moolenaar2016-03-281-6/+12
| | | | | Problem: Win32: waiting on a pipe with fixed sleep time. Solution: Start with a short delay and increase it when looping.
* patch 7.4.1666v7.4.1666Bram Moolenaar2016-03-281-22/+72
| | | | | Problem: When reading JSON from a channel all readahead is used. Solution: Use the fill function to reduce overhead.
* patch 7.4.1665v7.4.1665Bram Moolenaar2016-03-271-0/+5
| | | | | Problem: Crash when calling job_start() with a NULL string. (Dominique) Solution: Check for an invalid argument.
* patch 7.4.1662v7.4.1662Bram Moolenaar2016-03-261-0/+9
| | | | | | Problem: No test for an invalid Ex command on a channel. Solution: Test handling an invalid command gracefully. Avoid getting an error message, do write it to the channel log.
* patch 7.4.1631v7.4.1631Bram Moolenaar2016-03-211-1/+1
| | | | | | Problem: Compiler doesn't understand switch on all enum values. (Tony Mechelynck) Solution: Initialize variable.
* patch 7.4.1628v7.4.1628Bram Moolenaar2016-03-211-1/+1
| | | | | Problem: 64-bit Compiler warning. Solution: Change type of variable. (Mike Williams)
* patch 7.4.1624v7.4.1624Bram Moolenaar2016-03-201-0/+71
| | | | | Problem: Can't get info about a channel. Solution: Add ch_info().
* patch 7.4.1623v7.4.1623Bram Moolenaar2016-03-201-12/+1
| | | | | Problem: All Channels share the message ID, it keeps getting bigger. Solution: Use a message ID per channel.
* patch 7.4.1618v7.4.1618Bram Moolenaar2016-03-201-1/+1
| | | | | | Problem: Starting job with output to buffer changes options in the current buffer. Solution: Set "curbuf" earlier. (Yasuhiro Matsumoto)
* patch 7.4.1617v7.4.1617Bram Moolenaar2016-03-201-30/+133
| | | | | Problem: When a JSON message is split it isn't decoded. Solution: Wait a short time for the rest of the message to arrive.
* patch 7.4.1616v7.4.1616Bram Moolenaar2016-03-201-9/+24
| | | | | Problem: Malformed channel request causes a hang. Solution: Drop malformed message. (Damien)
* patch 7.4.1593v7.4.1593Bram Moolenaar2016-03-191-1/+0
| | | | | Problem: Using channel timeout instead of request timeout. (Coverity) Solution: Remove the extra assignment.
* patch 7.4.1579v7.4.1579Bram Moolenaar2016-03-151-35/+1
| | | | | Problem: Missing changes in channel.c Solution: Include the changes.
* patch 7.4.1560v7.4.1560Bram Moolenaar2016-03-141-28/+28
| | | | | Problem: Dict options with a dash are more difficult to use. Solution: Use an underscore, so that dict.err_io can be used.
* patch 7.4.1559v7.4.1559Bram Moolenaar2016-03-141-21/+93
| | | | | Problem: Passing cookie to a callback is clumsy. Solution: Change function() to take arguments and return a partial.
* patch 7.4.1544v7.4.1544Bram Moolenaar2016-03-121-0/+10
| | | | | Problem: On Win32 escaping the command does not work properly. Solution: Reset 'ssl' when escaping the command. (Yasuhiro Matsumoto)
* patch 7.4.1541v7.4.1541Bram Moolenaar2016-03-121-0/+34
| | | | | Problem: Missing job_info(). Solution: Implement it.
* patch 7.4.1539v7.4.1539Bram Moolenaar2016-03-121-2/+1061
| | | | | Problem: Too much code in eval.c. Solution: Move job and channel code to channel.c.
* patch 7.4.1537v7.4.1537Bram Moolenaar2016-03-111-75/+6
| | | | | Problem: Too many feature flags for pipes, jobs and channels. Solution: Only use FEAT_JOB_CHANNEL.