diff --git a/docs/changelog.txt b/docs/changelog.txt index dd171e8031..6df3dbfbf8 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -61,6 +61,10 @@ Template for new versions: - `autofarm`: thresholds can now be assigned to specific growth products of a plant (e.g. ``BUSH_QUARRY:LEAVES``), so crops that are grown for their growth items can be farmed to a target amount of that product ## Fixes +- Core: Windows console editing will no longer move the cursor to the next line or scroll the screen when the length of the text being edited exceeds the screen width. +- `autofarm`: farms that span multiple biomes are now handled correctly: crops that can grow in any of the farm's biomes can be assigned to the farm, instead of only using the biome of the farm's center tile +- `labormanager`: the modern engine's labor-mismatch probe no longer enables unmanaged labors on idle units or specialists, and no longer re-probes postings that can never be claimed (#6028) +- ``RemoteFortressReader``: ensured creature and caste names and caste descriptions in ``GetCreatureRaws``/``GetPartialCreatureRaws`` are transmitted in UTF-8 instead of CP437 - ``Units::teleport`` don't teleport units (except ghosts) into walls or impassable parts of buildings; don't teleport into or out of hidden tiles. - ``Units::teleport`` teleport babies along with their mothers, teleport merchant wagon-riders with their wagons. don't break links between wagons & their riders. - ``Units::teleport`` when using teleport to separate a rider/carried unit from its mount/carrying unit, clean up the links between the two. diff --git a/library/Console-windows.cpp b/library/Console-windows.cpp index 11648f90f6..908508bb3b 100644 --- a/library/Console-windows.cpp +++ b/library/Console-windows.cpp @@ -224,10 +224,7 @@ namespace DFHack { COORD pos = { (SHORT)x, (SHORT)y }; DWORD count = 0; - CONSOLE_SCREEN_BUFFER_INFO inf = { 0 }; - GetConsoleScreenBufferInfo(console_out, &inf); - SetConsoleCursorPosition(console_out, pos); - WriteConsoleA(console_out, str, len, &count, NULL); + WriteConsoleOutputCharacterA(console_out, str, len, pos, &count); } void prompt_refresh() @@ -238,9 +235,9 @@ namespace DFHack size_t len = raw_buffer.size(); int cooked_cursor = raw_cursor; - if (plen + cooked_cursor > cols) + if (plen + cooked_cursor > (cols-1)) { - int adj = std::min(plen + cooked_cursor - cols, len); + int adj = std::min(plen + cooked_cursor - (cols-1), len); buf += adj; len -= adj; cooked_cursor -= adj;