Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 3 additions & 6 deletions library/Console-windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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;
Expand Down
Loading